Re: Re: Bug #15677 Updated: quoted array index in string should be possible
| From: | Markus Fischer | Date: | Wed, 08 May 2002 19:21:39 +0000 |
| Subject: | Re: Re: Bug #15677 Updated: quoted array index in string should be possible | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-83826@lists.php.net to get a copy of this message | ||
Hi,
that is not the point. The point is, $array[index] is not
deprecated.
- Markus
On Wed, May 08, 2002 at 12:11:58PM -0700, brad lafountain wrote :
> Why don't you just do this.
>
> <?php echo "{$array['index']}"; ?>
> or
> <?php echo $array['index']; ?>
>
>
> - Brad
> --- Markus Fischer <mfischer@guru.josefine.at> wrote:
> > Hi,
> >
> > I don't know where this information comes from. I've asked a
> > few, it was never decided to 'remove $array[index] some day'.
> > If I missed it, flame me :) as I removed this sentence from
> > the manual now.
> >
> > - Markus
> >
> > On Wed, May 08, 2002 at 06:05:32PM -0000, destes@ix.netcom.com wrote :
> > > ID: 15677
> > > Updated by: destes@ix.netcom.com
> > > Reported By: hartmut@six.de
> > > Status: Open
> > > Bug Type: Feature/Change Request
> > > Operating System: *
> > > PHP Version: 4.1.1
> > > New Comment:
> > >
> > > I would very much like to see this implemented soon. Since PHP has
> > > said (at least in the manual) that it is trying to get away from
> > > $array[index] syntax and into $array['index'] syntax, support for this
> > > syntax directly in strings would help very much.
> > >
> > > -Steve
> > >
> > >
> > > Previous Comments:
> > > ------------------------------------------------------------------------
> > >
> > > [2002-02-22 09:42:10] hartmut@six.de
> > >
> > > <?php echo "$array[index]"; ?>
> > >
> > > works while
> > >
> > > <?php echo "$array['index']"; ?>
> > >
> > > gives
> > >
> > > PHP Parse error: parse error, expecting
T_STRING' or
> > > T_VARIABLE' or
> > > `T_NUM_STRING' in - on line 1
> > >
> > > the error message is not very helpfull (knowing the exact character
> > > position in the line would help a little bit, but that's another story)
> > > and the different syntax requirements for array indices within and
> > > outside of strings are somtimes confusing for newbies, too
> > >
> > > so "$array['index']" should be supported by the parser
> > >
> > > PS: i know about "{$array['index']}", but that is not the point
> > > ...
> > >
> > > ------------------------------------------------------------------------
> > >
> > >
> > > --
> > > Edit this bug report at
> > > http://bugs.php.net/?id=15677&edit=1
> >
> > --
> > Please always Cc to me when replying to me on the lists.
> > GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
> > "I'm not stupid, you know? :)" - Jani Taskinen
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness
> http://health.yahoo.com
--
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
"I'm not stupid, you know? :)" - Jani Taskinen