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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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);