Archives for

array_diff

Subtracting two dimensional arrays in PHP

In the development a WordPress plugin I had to subtract two dimensional arrays. I tried array_diff() function, unfortunately it doesn’t seem to work for two dimensional arrays. Even if it worked, it wasn’t exactly the functionality I wanted. Be warned, this isn’t exactly a alternate for array_diff(). For difference of two dimensional arrays you may