<?php
$array=array(1,2,3,6=>7,8,9,5,10);
echo count($array); //输出8
echo " ";
echo sizeof($array); //输出8
print_r($array);
?>
result:
8 8Array ( [0] => 1 [1] => 2 [2] => 3 [6] => 7 [7] => 8 [8] => 9 [9] => 5 [10] => 10 )
注意只有中间 6=>7 定义了键值和键名