I have an array like
$a=array([0]=>0 [1]=>3)
$b=array([0]=>image [1]=>profile [2]=>password [3]=>login)
i want to compare array a's key value i.e 0 to array b's index value 0
try array_intersect
array_intersect($a,$b);
or try === operator to compare the value in the array
<?php
$a=array(0,3);
$b=array(image,password);
foreach($a as $k=>$v){
if($a[$k]===$b[$k]){
echo "$k index is Same<br>";
}else{
echo "$k index is different<br>";
}
}
output
0 index is different
1 index is different