Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #array #unique #array #string #conversion
ADD COMMENT
Topic
Name
3+3 =