ArticleDirectory
Introduction: This is a detailed page of array_count_values () in [PHP Array Function Sequence]. It introduces PHP, related knowledge, skills, experiences, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 361700 'scrolling = 'no'> array_count_values () Definition and usage
The array_count_values () function is used to count the number of occurrences of all values in the array.
This function returns an array. The key name of the element is the value of the original array, and the key value is the number of times this value appears in the original array.
Syntax
Array_count_values (array)
| Parameters |
Description |
| Array |
Required. Specifies the input array. |
Example
<? PHP $ A = array ("cat", "dog", "horse", "dog"); print_r (array_count_values ($ A);?>
Output:
Array ([Cat] => 1 [Dog] => 2 [horse] => 1)
Source: http://www.cnblogs.com/zhouisizhi/
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/361700.html pageno: 1.