[ create a new paste ] login | about

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

PHP, pasted on Dec 29:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php 

$myarray = array(2,1,2,'',2,1,2,'',2,1,2,1,1,2,1,2,'',2,1,2,'',2,1,2,1,2);
$tests = array_chunk($myarray, 13);
//print_r($tests);

function mytest($tests)
{
    foreach($tests as $test) 
    {
        // play your test !
        print_r(array_count_values($test));
    }    
}
// add your argument for your test
echo mytest($tests);
?>


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


Create a new paste based on this one


Comments: