Answers for "php array unique convert to array"

PHP
2

php array unique array to string conversion

//if you have this error it's because array_unique() compare content of array
//as strings, but if your array contains other array the function convert array
//to string and throw an error. To avoid this error use this :

$newArray = array_unique($array, SORT_REGULAR);
Posted by: Guest on June-15-2021
0

unique key value array php

$input = array_map("unserialize", array_unique(array_map("serialize", $input)));
Posted by: Guest on February-15-2021

Browse Popular Code Answers by Language