$val){ if($val != $b[$key]){ echo "NO\n"; break; }else{ $n -= 1; if($n == 0){ echo "YES\n"; } } }