I have this PHP array :
$food = array('fruits' => array('orange', 'banana', 'apple'),
'veggie' => array('carrot', 'collard', NULL));
if I use this function :
$rows = count($food);
of course the result will be 2, but how to get number of array columns? so, I'm expecting 3 as a value of fruits and veggie columns. even though veggie has NULL.