php - Removing duplicated values from two-dimensional array -


i want remove duplicated values two-dimensional array.

i have used array_unique function two-dimensional array. , seems function not work two-dimensional array.

any suggestion or appreciated.

thank in advance.

here array output below:

array (     [0] => array         (       [is_hide] => 0             [key] => lho0vtlsfci7wwq2ewqy1nup5u13pxwlxt8s0775         )      [1] => array         (             [is_hide] => 0             [key] => gisklozxrhxtmhklaeempuwojms08ftweencmrpk         )      [2] => array         (             [is_hide] => 0             [key] => lho0vtlsfci7wwq2ewqy1nup5u13pxwlxt8s0775         ) ) 

you can use php's array_map() function:

$input = array_map("unserialize", array_unique(array_map("serialize", $input))); 

see this example.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -