I have a php array containing email addresses as array(email_address1 => name1, email2 => name2) format.I need to check that emails are valid and I can \[code\]foreach\[/code\] and \[code\]foreach($arr as $email => $name) { $new = array(); if(filter_var($email, FILTER_VALIDATE_EMAIL)) { $new[$email] = $name; }return $new;}\[/code\]Can I achieve the above using array_filter? what would be the syntax??\[code\]array_filter($emails_arr, 'filter_var') ?? how about FILTER_VALIDATE_EMAIL parameter?\[/code\]thanks.