Hi,
I simulated that one and it indeed doesn't work with an array of arrays.
When I built two arrays with just the values it worked.
So get the results with mysql_fetch_array and built two additional arrays which just contain the names.
the array of mysql_fetch_array looks like that:
array(array("field"=>"a"),array("field"=>"b"),array("field"=>"c"),array("field"=>"d"),array("field"=>"e"));
You have to build an array that looks like:
$array1=array("a","b","c","d","e");
something like:
$fetched1 = mysql_fetch_array($result);
$array1 = "";
for ($i=0;$i<count($fetched1);$i++) {
$array1[] = $fetched1[$i]["field"];
}
$fetched2 = mysql_fetch_array($result);
$array2 = "";
for ($i=0;$i<count($fetched2);$i++) {
$array2[] = $fetched2[$i]["field"];
}
$array3 = array_diff($array1,$array2);
$array3 will then contain all fields values of $array1 that do not exist in $array2
If you also want to get all the values of $array2 that do not exist in $array1 you would have to create another array
$array4 = array_diff($array2,$array1);