My question is, given i have the following php code to compare two strings:
$cadena1='JUAN LÓPEZ YÁÑEZ';
$cadena2='JUAN LOPEZ YÁÑEZ';
if($cadena1===$cadena2){
echo '<p style="color: green;">The strings match!</p>';
}else{
echo '<p style="color: red;">The strings do not match. Accent sensitive?</p>';
}
I notice for example that if I compare LOPEZ and LÓPEZ then the comparison turns to false.
Is there a way or a function already there to compare theses strings regardless of the Spanish accents?