Remove uniqueArray() which returns a unique array (removes duplicates)

Use array_unique() which is built into php instead.
This commit is contained in:
Scott Ullrich 2006-02-05 20:59:42 +00:00
parent a9ea8b8f0f
commit ae4d4f4529

View File

@ -1690,19 +1690,4 @@ function print_value_list($list, $count = 10, $separator = ",") {
return $list;
}
function uniqueArray($array)
{
// Get unique elts as keys in assoc. array
for ($i=0,$n=count($array, 1);$i<$n;$i++)
$u_array[$array[$i]] = 1;
// Copy keys only into another array
reset($u_array, 1);
for ($i=0,$n=count($u_array, 1);$i<$n;$i++) {
$unduplicated_array[] = key($u_array, 1);
next($u_array, 1);
}
return $unduplicated_array;
}
?>