- array_push: documentation ( source)
- strcasecmp: documentation ( source)
<?php
$emailrepeat = 'test';
$email_clean = 'test';
if(strcasecmp($emailrepeat, $email_clean) != 0){
//WILL RETURN THAT BOTH STRINGS MATCH
array_push($errorMessages,'Your emails did not match');
}
if(strcasecmp($email_clean, $emailrepeat) != 0){
//WILL RETURN THAT BOTH STRINGS DONT MATCH
array_push($errorMessages,'Your emails did not match');
}