Forum Moderators: coopster
I've been doing some research and it looks like others have had the same problem.
Given a multidimensional array, is there a way to do an array_unique type function? An example with a foreach or while loop would be great. TIA.
$input = array(
"veggies1" => array(
0 => "parsnips",
1 => "carrots",
2 => "tomatoes"),
"veggies2" => array(
3 => "potatoes",
4 => "potatoes", // gets rid of this one!
5 => "peas",
6 => "carrots")
);
foreach ($array as $key => $value) $array[$key] = array_unique($value);