hello,
here is the code:
<?
$a=array(1,3,4, 5,6,7,8,9,10);
$b=array_count_ values($a);
print_r($b);
?>
the result will be: [1]=>1 [3]=>1...........
I would like that the keys which doesnt appear in the result of
array_count_val ues (here it is the number 2)
have the value 0.......the new result will be: [1]=>1 [2]=>0
[3]=>1...........
how can we formulate a php code to resolve that ?
here is the code:
<?
$a=array(1,3,4, 5,6,7,8,9,10);
$b=array_count_ values($a);
print_r($b);
?>
the result will be: [1]=>1 [3]=>1...........
I would like that the keys which doesnt appear in the result of
array_count_val ues (here it is the number 2)
have the value 0.......the new result will be: [1]=>1 [2]=>0
[3]=>1...........
how can we formulate a php code to resolve that ?
Comment