How can I extract only the indexes of the array_diff function?
$array1 = array("a" => "green", "red", "blue", "red", "pink");
$array2 = array("b" => "green", "yellow", "red");
$result = array_diff($array1, $array2);
print_r($result);
Instead of it showing: Array ( [1] => blue [3] => pink ) I want it to display only the indexes like this: 1, 3 (maybe inside a new array called $indexesresult) (Reason being that I am comparing an online (mysqli) array with a localhost (mysqli) array and I have to remove whitepaces before I can compare the arrays- I tried hundreds of ways around this but to no avail: array_diff does not like any type of whitespaces). With the indexesresult I can then get the original values back into the arrays to display the differences in a neat tabular format.