Re: Bizarre array key 'feature'?
| From: | Derick Rethans | Date: | Thu, 09 Nov 2000 10:53:47 +0000 |
| Subject: | Re: Bizarre array key 'feature'? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-37524@lists.php.net to get a copy of this message | ||
Hi John,
use $ourArray["default"]["a"] and error will probably go away.
Derick
John Parker wrote:
> Hi, all.
>
> Hmm.. bit of a strange one, this... Is 'default' considered a reserved word
> in the construction of muti-dimensional arrays?
>
> ie: The following code works.
>
> $ourArray[test][a] = true;
> $ourArray[test][b] = false;
> ...
>
> But the following fails (Parse error: parse error, expecting `']'') at the
> first line containing the 'default' key.
>
> $ourArray[default][a] = true;
> $ourArray[default][b] = false;
>
> Using PHP4.0.2 (yeah, I know I should probably upgrade).
>
> Thanks in advance,
> JP.
>
> ------------------------------------------------------------------
> John Parker email: jparker@itchannel.net
> Internet Project Manager/Software Engineer web:www.itchannel.net
> itCHANNEL International Ltd. tel: +44 (0) 1202 291939
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Derick Rethans
JDI Media Solutions
H.v.Tussenbroekstraat 1
6952 BL Dieren
The Netherlands
e-mail: d.rethans@jdimedia.nl
http://www.jdimedia.nl/