get unique array from multidimentional array by value in php 1

get unique array from multidimentional array by value in php

";
print_r($arr);
echo "unique*********************
"; print_r(super_unique($arr,'titel')); ?>

Here is what the above code is Doing:
1. First, we create a function called super_unique.
2. This function takes two arguments: an array and a key.
3. We then create a temporary array called temp_array.
4. We then loop through the array and check if the key exists in the temp_array.
5. If it doesn’t, we add it to the temp_array.
6. We then reset the array to the values of the temp_array.
7. Finally, we return the array.

Similar Posts