mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Remove uniqueArray() which returns a unique array (removes duplicates)
Use array_unique() which is built into php instead.
This commit is contained in:
parent
a9ea8b8f0f
commit
ae4d4f4529
@ -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;
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user