$food = array('fruits' => array('orange', 'banana', 'apple'),
'veggie' => array('carrot', 'collard', 'pea')); // recursive count
echo count($food, COUNT_RECURSIVE); // output 8
怎么是输出8的呢?不是6么?
'veggie' => array('carrot', 'collard', 'pea')); // recursive count
echo count($food, COUNT_RECURSIVE); // output 8
怎么是输出8的呢?不是6么?
‘If the optional $mode parameter is set to COUNT_RECURSIVE (or 1), count(3) will recursively count the array’