Re: Is there such an array like $array[][]?

From: Date: Tue, 17 Apr 2001 16:41:35 +0000
Subject: Re: Is there such an array like $array[][]?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-49011@lists.php.net to get a copy of this message
PHP can be a tad screwy with how it handles multi-dimensional arrays, but yes PHP handles them. No real speed problems with them either. But you may just want to use an associative array like: $loc = array("y" => $y, "x" => $x); Then just use $loc["y"] and $loc["x"]. Just another option, but feel free to use multi-dimensional arrays. Just be aware that PHP supports only two dimensions (so $array[][][] will not work), and if you try and get fancy with sort() and count() you are going to give yourself a migraine. -- Plutarck Should be working on something... ...but forgot what it was. "Jack Dempsey" <dempsejn@georgetown.edu> wrote in message news:3ADC731D.654BEE7@georgetown.edu... > yes, that's a multi-dimensional array, which is fine in php (and > everything else i can think of =P)... > > -jack > > Scott Fletcher wrote: > > > > Hi! I am wondering if there is such a php array that can take care of the x > > and y axis data. I figure that using this array type, $axis[$x][$y] would > > do the trick. Would it work? If not, then education me on what would work! > > Thanks! > > > > Scott > > > > -- > > 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 > > -- > 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 (#49011) next »