Re: Assistance Please - Two-Dimension Arrays

From: Date: Sun, 23 Sep 2001 04:54:37 +0000
Subject: Re: Assistance Please - Two-Dimension Arrays
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-68393@lists.php.net to get a copy of this message
Mark, PHP, at this point, does not support MultiDimension arrays. However, you can get around this by placing array's inside arrays. Thus: $myarray[0] = array("element00", "element01","element02"); $myarray[1] = array("element10", "element11","element12"); $myarray[2] = array("element20", "element21","element22"); You would refrence "element11" by $myarray[1][1]; Hope it helps! -Jason Garber deltacron.com At 12:03 PM 9/23/2001 +0800, Mark van Proctor wrote:
I'm trying to fill information that i read out of files into a 2 dimensional array. My main problem (i think) is that i dont know how to declare a 2 dimensional array prior to adding parts to it. Especially since the size of each internal array and the external array are all picked up from the files and read as strings - i'm not sure how to convert these to ints. I don't know how to test if the data is beign stored in the array because when i come out of the "entry" loop, the count() size of the array is 0. I'm very new at this so any help you can offer is greatly appreciated. Thanks, Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.general (#68393) next »