[ create a new paste ] login | about

Link: http://codepad.org/WiJREPbf    [ raw code | output | fork ]

PHP, pasted on Oct 13:
1
2
3
4
<?php
$array = array(2,6,10,98,100,5,3,2,1,5,10);
print_r(array_count_values($array));
?>


Output:
1
2
3
4
5
6
7
8
9
10
11
Array
(
    [2] => 2
    [6] => 1
    [10] => 2
    [98] => 1
    [100] => 1
    [5] => 2
    [3] => 1
    [1] => 1
)


Create a new paste based on this one


Comments: