it's important to remember that what you have here is NOT a 2d array. $array is an array, each element of which can be any sort of variable ... e.g. $array[1] = "fred"; $array[2] = Array(); $array[3] = 1.245; ... but then try ... foreach ($array as $thisarray) echo(count($thisarray) . "<br>"); ... in this case count($array[2]) = 0 but count($array[1]) = 1 ... so be careful. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -----Original Message----- > From: Fabian Fabela [mailto:[EMAIL PROTECTED]] > Sent: 15 February 2001 18:33 > To: [EMAIL PROTECTED] > Subject: Count columns in array > > > Hello, > > I have the array $array[x][y]; > > if I want to know the x I use count($array); > > Now, How can I count the y?? > > Thank you. > > Fabian Fabela > [EMAIL PROTECTED] > www.vacagorda.com > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]