Re: Purpose of $$var ?????
| From: | Scott Fletcher | Date: | Tue, 16 Jul 2002 14:39:19 +0000 |
| Subject: | Re: Purpose of $$var ????? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-107879@lists.php.net to get a copy of this message | ||
Alright! Found the problem! Faulty script written that come before this
script where $$var come into play. At least, it wasn't me, it was the other
programmer's error. :-)
"Scott Fletcher" <scott@abcoa.com> wrote in message
news:20020716140950.61894.qmail@pb1.pair.com...
> Interesting! Look like the 2nd "$" is decomissioned and is reserve for
> something in the future or something. Just like the "_" is when it come
> with $_POST as an example. That would explain why it doesn't work with
PHP
> 4.2.x & up.
>
> "Andrey Hristov" <ahristov@icygen.com> wrote in message
> news:002601c22cd0$b1995170$1601a8c0@nik...
> > Variable variable. Read the docs.
> >
> > $v = 'foo';
> > $foo = 'bar';
> > echo $$v;
> >
> > Regards,
> > Andrey
> >
> > P.S.
> > Sometimes {} are used : ${$v}
> >
> >
> >
> >
> > "Scott Fletcher" <scott@abcoa.com> wrote in message
> > news:<20020716135017.43862.qmail@pb1.pair.com>...
> > > The script was working great before PHP 4.2.x and not after that. So,
I
> > > looked through the code and came upon this variable, "$$var". I have
no
> > > idea what the purpose of the double "$" is for a variable. Anyone
know?
> > >
> > > --clip--
> > > $var = "v".$counter."_high_indiv";
> > > $val3 = $$var;
> > > --clip
> > >
> > > Thanks,
> > > FletchSOD
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
>
>