I have a form that submits the data in array format. I have sanitized all the data and also tried to escape it using esc_attr
, but it is a function of escaping and not sanitizing.
Is there a better way to sanitize the entire array (with text value) instead of each individual value.
$array = array_map( 'esc_attr', $array );
How can we make sure the data is sanitize and not just escaped?