mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 15:18:58 +01:00
added arrau_unique
This commit is contained in:
parent
267ca57168
commit
40cd00c1b8
@ -98,6 +98,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
function array_unique ($array)
|
||||
{
|
||||
reset($array);
|
||||
$reversed_array = Array();
|
||||
while(list($key,$value) = each($array))
|
||||
{
|
||||
if (!isset($reversed_array[$value]))
|
||||
{
|
||||
$reversed_array[$value] = $key;
|
||||
}
|
||||
}
|
||||
unset($key, $value);
|
||||
while(list($key,$value) = each($reversed_array))
|
||||
{
|
||||
$new_array[$key] = $value;
|
||||
}
|
||||
return $new_array;
|
||||
}
|
||||
|
||||
function str_repeat($input,$multiplier)
|
||||
{
|
||||
for($i=0,$output='';$i<$multiplier;$i++)
|
||||
|
Loading…
Reference in New Issue
Block a user