"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote:
> > 1. If $id is a number I believe PHP will choke b/c I don't believe
numbers
> > can be used as variable names.
>
> Well, generally that is true. If you try to assign a value directly to a
> variable that is a number such as:
>
> $1 = "Hello World";
>
> Then it won't work. However, due to a somewhat quirky implementation you
> can get arund this by doing:
>
> $a=1;
> $$a = "Hello World";
Sure enough, it works. Rasmus, can we expect this behavior to exist in
future releases of PHP? I prefer to give variables a meaningful name, but
since I spend a fair amount of time working with other people's code and
clients who sometimes insist on things that aren't preferable, it would be
nice to know.
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]