So i have:
Array (
[animals] => Array
(
[0] => horse
[1] => dog
[2] => dog
)
[team] => Array
(
[0] => cubs
[1] => reds
[2] => cubs
)
)
Trying to eliminate the repeat ones with animals and same with team.
Tried this but didn't help.
$unique = array_map("unserialize", array_unique(array_map("serialize", $result)));
Seems like it doesn't reach deep inside, don't want either to hard code animals or team.
$data = [
'animals' => ['horse', 'dog', 'dog'],
'team' => ['cubs', 'reds', 'cubs']
];
$result = array_map('array_unique', $data);
print_r($result);