I've tried a lot of solutions, but none of them worked with my case. For example I have 3 arrays (the amount of them can vary from 1 to 4) and I want to delete all the duplicate values from multidimensional array
Example
Array
(
[33] => Array
(
[product_id] => 33
[name] => Aliquam dolor tellus Aliquam dolor tellus
[color] => Brown
[breat] => 3
[shorten] => Yes
[material] => Natural
[rigidity] => Low
)
[54] => Array
(
[product_id] => 54
[name] => New Style
[color] => Black
[breat] => 4
[shorten] => Yes
[material] => Natural
[rigidity] => Low
)
[23] => Array
(
[product_id] => 23
[name] => New Natural
[color] => Yellow
[breat] => 5
[shorten] => No
[material] => Natural
[rigidity] => Low
)
)
And here is the desired array.
Array
(
[33] => Array
(
[product_id] => 33
[name] => Aliquam dolor tellus Aliquam dolor tellus
[color] => Brown
[breat] => 3
[shorten] => Yes
[material] =>
[rigidity] =>
)
[54] => Array
(
[product_id] => 54
[name] => New Style
[color] => Black
[breat] => 4
[shorten] => Yes
[material] =>
[rigidity] =>
)
[23] => Array
(
[product_id] => 23
[name] => New Natural
[color] => Yellow
[breat] => 5
[shorten] => No
[material] =>
[rigidity] =>
)
)
materialandrigidityKeys are part of each Sub-Array. Do You want to say that you wish to delete thematerialandrigidityKeys from each sub-array?var_export()or preferredserialize()?