RE: [PHP] Count of multi-dimensional array

2001-02-18 Thread ..s.c.o.t.t..
print $total; in your case, it will (should) print "8" > -Original Message- > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] > Sent: Saturday, February 17, 2001 09:52 > To: bill > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Count of multi-dimensional array >

Re: [PHP] Count of multi-dimensional array

2001-02-17 Thread Rasmus Lerdorf
count($myarray) will give you 3 On Sat, 17 Feb 2001, bill wrote: > How can i get the count of a multi-dimensional array? > > if I have > > $myarray[0][chicken] > $myarray[0][fish] > $myarray[0][meat] > $myarray[1][fries] > $myarray[1][chips] > $myarray[2][coke] > $myarray[2][pepsi] > $myarray[2]

[PHP] Count of multi-dimensional array

2001-02-17 Thread bill
How can i get the count of a multi-dimensional array? if I have $myarray[0][chicken] $myarray[0][fish] $myarray[0][meat] $myarray[1][fries] $myarray[1][chips] $myarray[2][coke] $myarray[2][pepsi] $myarray[2][rootbeer] How can I get the number of first elements (which would be 3 above)? thanks,