I have two arrays that have identical keys. I want to check array a against array b and return the the whole row of the array of a that is NOT in b. I am messing with all of them and can't get the desired results. my arrays look like this:
//array a
Array
(
[0] => Array
(
[pid] => 457633
[name] => Test
[descr] => sample
[creator] =>
[datetime] =>
)
)
//array b
Array
(
[0] => Array
(
[pid] => 1234
[name] => server
[descr] => server
[creator] => server
[datetime] => server
)
[1] => Array
(
[pid] => 12343
[name] => serv3er
[descr] => ser3ver
[creator] => se3rver
[datetime] => serve3r
)
)
this is the result of when i array_diff_assoc(b, a)
Array
(
[1] => Array
(
[pid] => 12343
[name] => serv3er
[descr] => ser3ver
[creator] => se3rver
[datetime] => serve3r
)
)
but when i compare a to b it is blank.
I would even like to go further only compare the first value of the array (pid in this case), and if its not in both return that a row