To check multi-deminsions try something like this:
$pageWithNoChildren = array_map('unserialize',
array_diff(array_map('serialize', $pageids), array_map('serialize', $parentpage)));
array_map()
runs each sub-array of the main arrays throughserialize()
which converts each sub-array into a string representation of that sub-array- the main arrays now have values that are not arrays but string representations of the sub-arrays
array_diff()
now has a one-dimensional array for each of the arrays to compare- after the difference is returned
array_map()
runs the array result (differences) throughunserialize()
to turn the string representations back into sub-arrays
Q.E.D.