Re: Count columns in array
| From: | Mukul Sabharwal | Date: | Thu, 15 Feb 2001 18:33:57 +0000 |
| Subject: | Re: Count columns in array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-39960@lists.php.net to get a copy of this message | ||
Hi,
Well it depends, on which elements /2nd/ dimension you
wanna see!
here's some code:
$myarr[0][0] = "sdkjsjks";
$myarr[1][0] = "dsjkdkjsd";
$myarr[1][1] = "hsjdsh";
$myarr[1][2] = "dsjkdsjkdkjsdkjs";
echo sizeof($myarr); // would print 2, element 0 and
1.
echo sizeof($myarr[0]); would print 1, 0 of 0.
echo sizeof($myarr[1]); would print 3, 3 of 1.
Hope that helps. It goes on into as many dimensions!
=====
To find out more about me : http://www.geocities.com/mimodit
My bookmarks are available @ http://mukul.free.fr
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/