You are here

public static function Reader::arrayUnique in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-feed/src/Reader/Reader.php \Zend\Feed\Reader\Reader::arrayUnique()

Utility method to apply array_unique operation to a multidimensional array.

Parameters

array:

Return value

array

File

vendor/zendframework/zend-feed/src/Reader/Reader.php, line 665

Class

Reader

Namespace

Zend\Feed\Reader

Code

public static function arrayUnique(array $array) {
  foreach ($array as &$value) {
    $value = serialize($value);
  }
  $array = array_unique($array);
  foreach ($array as &$value) {
    $value = unserialize($value);
  }
  return $array;
}