Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/main/inc/lib/array.lib.php

32 lines
642 B

<?php
/* For licensing terms, see /license.txt */
/**
* This is the array library for Chamilo.
* Include/require it in your code to use its functionality.
*
* @package chamilo.library
*/
/**
* Removes duplicate values from a dimensional array
*
* @param array a dimensional array
* @return array an array with unique values
*/
function array_unique_dimensional($array) {
if(!is_array($array))
return $array;
foreach ($array as &$myvalue) {
$myvalue=serialize($myvalue);
}
$array=array_unique($array);
foreach ($array as &$myvalue) {
$myvalue=unserialize($myvalue);
}
return $array;
}
?>