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);