public static function arrayUnique(array $array)
    {
        // Serialize each array's value
        foreach ($array as &$value) {
            $value = serialize($value);
        }

        // Now remove duplicate strings
        $array = array_unique($array);

        // Now restore to its previous state with removed strings
        foreach ($array as &$value) {
            $value = unserialize($value);
        }

        return $array;
    }
public static function arrayUnique(array $array)
    {
        // Serialize each array's value
        foreach ($array as &$value) {
            $value = serialize($value);
        }

        // Now remove duplicate strings
        $array = array_unique($array);

        // Now restore to its previous state with removed strings
        foreach ($array as &$value) {
            $value = unserialize($value);
        }

        return $array;
    }
public static function arrayUnique ( array $ array ) { // Serialize each array's value foreach ( $ array as & $ value ) { $ value = serialize ( $ value ) ; } // Now remove duplicate strings $ array = array_unique ( $ array ) ; // Now restore to its previous state with removed strings foreach ( $ array as & $ value ) { $ value = unserialize ( $ value ) ; } return $ array ; }
Array unique for multi-dimensional arrays

@param array $array
@return array
Array unique for multi - dimensional arrays