I have two arrays in my script.
$array1 = array("a" =>'1','2','3','4','5','6','7','8','9','10');
$array2 = array("b" => '1','3','4','6','7','8','10');
I want to compare those array and find items which is exist in $array1 but not in $array2.
For this I use array_diff($array1, $array2) which gives o/p like this Array ( [0] => 2 [3] => 5 [7] => 9 ).
But I want o/p like this Array ( [0] => 2 [1] => 5 [2] => 9 )