array_count_values (PHP 4 ) array_count_values -- Zählt die Werte eines Arrays Beschreibungarray array_count_values ( array input)
array_count_values() gibt ein Array zurück, in
dem die Werte des Arrays input als
Schlüssel, und deren Anzahl als Werte angegeben sind.
Beispiel 1. array_count_values() $array = array (1, "hello", 1, "world", "hello");
print_r(array_count_values ($array)); |
Wird folgendes ausgeben:
Array
(
[1] => 2
[hello] => 2
[world] => 1
) |
|
|
| |
© 1998-2007 Gold Vision Communications All Rights Reserved.
|