Hey, there are also arrays,

these can do much more and can be used most of the times you think of
var-var solution...


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-----Original Message-----
From: John Meyer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 10:47 PM
To: Jason Stechschulte
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Variable variables


Okay, that makes a little sense, but isn't there some sort of collection
that will do the same thing (coming from vb).

-----Original Message-----
From: Jason Stechschulte [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 6:38 AM
To: John Meyer
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Variable variables


On Tue, Mar 13, 2001 at 06:36:10AM -0700, John Meyer wrote:
> Okay, I read about this feature in the php manual.  What I can't figure
out
> is why in the world would anybody want to use this feature?  Not to start
a
> flame war, just would like an explanation of why this feature is useful.

I've really only used them once, but they were handy for that situation.
I had a column in a mysql table that was a set column of user
privileges, and I wanted to register every value in the set as a session
variable.

<horridcode>
for($i = 0; $i < sizeof($privs); $i++) {
   $$privs[$i] = 1;
   session_register($privs[$i]);
}
</horridcode>


--
Jason Stechschulte
[EMAIL PROTECTED]
--
I surely do hope that's a syntax error.
             -- Larry Wall in <[EMAIL PROTECTED]>


--
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]



-- 
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]

Reply via email to