PHP: Check for duplicate values in a multidimensional array -


i have issue multidimensional arrays.

given following multidimensional array:

array( [0] => array("a", "b", "c") [1] => array("x", "y", "z") [2] => array("a", "b", "c") [3] => array("a", "b", "c") [4] => array("a", "x", "z") ) 

i want check values , find duplicates (i.e. keys 0, 2 , 3) leaving 1 key - value pair deleting others, resulting in somthing this:

array(     [0] => array("a", "b", "c")     [1] => array("x", "y", "z")     [2] => array("a", "x", "z")     ) 

how can that??

this remove duplicate items array using array_unique():

$new_arr = array_unique($arr, sort_regular); 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -