Re: Is there such an array like $array[][]?
| From: | CC Zona | Date: | Tue, 17 Apr 2001 18:52:45 +0000 |
| Subject: | Re: Is there such an array like $array[][]? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49023@lists.php.net to get a copy of this message | ||
In article <9bhrri$sn9$1@toye.p.sourceforge.net>,
aemuli@spamclause-yahoo.com ("Plutarck") wrote:
> 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.
Odd. 3+ dimensions works fine for me. I pass two dimensional arrays in
forms all the time, then reference them from $HTTP_*_VARS which adds
another dimension. No problem there. It's true sort() and count() are
sorting or counting the elements of the first dimension, but PHP does
provide other functions which allow for effective handling of more
dimensions (ex. array_multisort()).
--
CC