array_diff() for multidimension arrays?

Hi I have a multi-dimensional array like this:

Array
(
[0] => Array
(
[Value] => val8
[Id] => 522
[TemplateId] => 96
)

[1] => Array
    (
        [Value] => val5
        [Id] => 523
        [TemplateId] => 92
    )

[2] => Array
    (
        [Value] => val1a
        [Id] => 524
        [TemplateId] => 90
    )

}

And I want to compare it with another array which also has the same format but different values. How should I use array_diff() which compares the ‘TemplateId’. As far as I know array_diff() is for one dimensional array. Anybody has any ideas on how it should be done for multi-dimensional arrays?

Thanks.

See this comment from PHP.net on the array_diff function.

Is this what you mean?

This might be way off but couldnt you go about something like this:


serialize($array);
serialize($array2);

strcmp($array, $array2);