php array unique array to string conversion

Solutions on MaxInterview for php array unique array to string conversion by the best coders in the world

showing results for - "php array unique array to string conversion"
Soren
16 Jan 2017
1//if you have this error it's because array_unique() compare content of array
2//as strings, but if your array contains other array the function convert array
3//to string and throw an error. To avoid this error use this :
4
5$newArray = array_unique($array, SORT_REGULAR);