<?php
$data = array(
"apples" =>
array("red", "yellow", "pineapples"),
"bananas" =>
array("small", "medium", "big"),
"vegs" =>
array("potatoes", "carrots", "onions")
);
$rows = count($data,0);
$cols = (count($data,1)/count($data,0))-1;
print "There are {$rows} rows and {$cols} columns in the table!";
?>
There are 3 rows and 3 columns in the table!