actually, they are different -- array_add checks for uniqueness

git-svn-id: file:///home/shish/svn/shimmie2/trunk@232 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish
2007-07-06 04:47:01 +00:00
parent 7638c8de70
commit cec93d8a4d
2 changed files with 8 additions and 2 deletions

View File

@@ -283,6 +283,12 @@ function array_remove($array, $to_remove) {
return $a2;
}
function array_add($array, $element) {
$array[] = $element;
$array = array_unique($array);
return $array;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
* Event API *