Re: note 8657 added to Variable variables
| From: | J. M. Castagnetto | Date: | Sat, 23 Sep 2000 00:18:12 +0000 |
| Subject: | Re: note 8657 added to Variable variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-5360@lists.php.net to get a copy of this message | ||
Bug reports, questions and features requests should
not go in the notes system, that's why the mailing
lists, bug server, etc. are for, use them.
Array name parsing is not simple when using var vars,
and you need to explicitely tell the parser what you
mean, ${$x[5]) is not the same as {$$x}[5], so your
assigment makes not much sense from the point of view
of parsing.
Rethink what you are trying to accomplish by looking
at how the info is being parsed.
Note removed.
--- cluby@mycomputer.com wrote:
> This is one thing that I have noticed that dosn't
> work quite the way it should:
>
> $x[5] = 'foo';
> $y = 'x[5]';
> $$y = 'bar';
> printf("%s %s\n",$x[5],$$y);
>
> The output will be 'foo bar' when it should be 'bar
> bar'.
>
> Is there a way to fix/get around this? Or am I
> wishing for the impossible?
>
>
>
http://www.php.net/manual/language.variables.variable.php
>
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-notes-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-notes-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
--- Jesus M. Castagnetto (jcastagnetto@yahoo.com)
__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/