Re: cvs: /phpdoc/language types.sgml
| From: | Thies C. Arntzen | Date: | Mon, 15 Nov 1999 08:34:51 +0000 |
| Subject: | Re: cvs: /phpdoc/language types.sgml | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-12553@lists.php.net to get a copy of this message | ||
On Sun, 14 Nov 1999, Lars Torben Wilson wrote:
> Lars Torben Wilson writes:
> > Andrei Zmievski writes:
> > > That's exactly why PHP 4 supports the following syntax:
> > >
> > > echo "This will work: ${a[3][bar]}";
> >
> > I thought I'd read something about that somewhere. However, PHP4
> > (recent CVS) barfs on that syntax:
> >
> > <?php
> > $a[3]['bar'] = 'Bob';
> > echo "This won't work: ${a[3][bar]}";
> > ?>
>
>
> Just to follow up on myself--the reason it barfs is 'cause it should
> be:
>
> echo "This won't work: {$a[3][bar]}";
how about:
echo "This won't work: {$a[3]["bar"]}";
(does not gererate a "Use of undefined constant hallo" warning)
tc
>
> This works fine. Thanks for the note, Andrei.
>
>
> Torben
>
> --
> 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
>
>
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany