I tried that test script you mentioned and it doesn't work in PHP 4.2.1.  I
have a very good idea why is that, must have to do with the php.ini.
Unfortunately, it doesn't work either.  I'll tell you what, I'll just throw
out that script and write a different script.  This time, no double "$".

--clip--
 for($i=1;$i<100;$i++){
  $user="user".$i;
  echo $$user."*<br>";
 }
--clip--
"Joakim Andersson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> The cause for your problem would be that register_globals defaults to off
in
> PHP 4.2.x and greater.
> The solution? Start using the new superglobals ($_POST, $_GET, $_SESSION
> etc) or (not recomended) set register_globals = on in php.ini
>
> Read more here:
> http://www.php.net/manual/en/language.variables.predefined.php
>
> Regards
> Joakim Andersson
>
>
> > -----Original Message-----
> > From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 16, 2002 3:54 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Purpose of $$var ?????
> >
> >
> > 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
> >



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to