I have an array as such:
$fake_categories = [
[
'handle' => 'food',
'nice_name' => 'Food'
],
[
'handle' => 'travel',
'nice_name' => 'Travel'
],
[
'handle' => 'fashion',
'nice_name' => 'Fashion'
],
[
'handle' => 'food',
'nice_name' => 'Food'
]
];
And I wish to make sure that the packages are unique (by the key handle
). As you can see, the last item in the array is a duplicate and needs to be removed.
How can I perform a deep array_unique
?