Hi I have two arrays and I want to check them if they have any element equal (same) with each other and if they have they should get on the page if not just print No.
I have made this code but i do not know why it doesn't work.
P.S. the elements of arrays contain text.
$res = count($title1);
for ($j = 0; $j <= $res; $j++) {
if(strtoupper($title2[$j]) == strtoupper($title1[$j]))
{
echo 'Yes<br/>';
echo $title2[$j].'==='.$title1[$j].'<br/';
}
else{
echo 'No<br/>';
}
}