Here I have this array:
$myArray = array(5) {
[0]=> string(62) " läs våra leveransvillkor/reservationer "
[1]=> string(61) " läs våra leveransvillkor/reservationer "
[2]=> string(60) " läs våra leveransvillkor/reservationer"
[3]=> string(107) "om skorstenen bryter nock, ränndal, bjälke, el, vent etc tillkommer kostnad för vinklar eller avväxling"
[4]=> string(59) "läs våra leveransvillkor/reservationer"
}
Here, four values are the same. So I want to keep only one.
I did try to use array_unique
, and even I did try this:
array_map("unserialize", array_unique(array_map("serialize", $myArray)));
But I was not succeed in removing duplicates. I guess the issue is because of the special character.