★ wanayoo — archive 1999 http://fr.php.net/manual/en/function.array-count-values.phpNouvelle recherche | Portail wanayoo
PHP Tuesday, March 20, 2001  
downloads | documentation | faq | support | reporting bugs | links 

search for in the  

lookup:
PHP ManualPHP Manual
ArraysArrays
 arrayarray
 array_count_valuesarray_count_values
 array_diffarray_diff
 array_fliparray_flip
 array_intersectarray_intersect
 array_keysarray_keys
 array_mergearray_merge
 array_merge_recursivearray_merge_recursive
 array_multisortarray_multisort
 array_padarray_pad
 array_poparray_pop
 array_pusharray_push
 array_randarray_rand
 array_reversearray_reverse
 array_shiftarray_shift
 array_slicearray_slice
 array_splicearray_splice
 array_sumarray_sum
 array_uniquearray_unique
 array_unshiftarray_unshift
 array_valuesarray_values
 array_walkarray_walk
 arsortarsort
 asortasort
 compactcompact
 countcount
 currentcurrent
 eacheach
 endend
 extractextract
 in_arrayin_array
 array_searcharray_search
 keykey
 krsortkrsort
 ksortksort
 listlist
 natsortnatsort
 natcasesortnatcasesort
 nextnext
 pospos
 prevprev
 rangerange
 resetreset
 rsortrsort
 shuffleshuffle
 sizeofsizeof
 sortsort
 uasortuasort
 uksortuksort
 usortusort

previousarray
array_diffnext

Last updated: Tue, 20 Mar 2001
view this page in English | Brazilian Portuguese | Czech | Dutch | French | German | Hungarian | Italian | Japanese | Korean | Spanish | Plain HTML

array_count_values

(PHP 4 >= 4.0b4)

array_count_values -- Counts all the values of an array

Description

array array_count_values (array input)

Array_count_values() returns an array using the values of the input array as keys and their frequency in input as values.

Example 1. Array_count_values() example


$array = array (1, "hello", 1, "world", "hello");
array_count_values ($array); // returns array (1=>2, "hello"=>2, "world"=>1)
      

previousarray
array_diffnext

Last updated: Tue, 20 Mar 2001
add note | about notes

show source | credits | mirror sites:  

Copyright © 1998-2001 The PHP Group
All rights reserved.
This mirror generously provided by: L'Université Michel de Montaigne Bordeaux III
Last updated: Tue Mar 20 12:31:12 2001 MET