And also for class names $foo = "bar"; $blah = new $foo();
$blah would be a new instance of the class bar I've actually used the above, but it was a special case.. I wouldn't normally use it. -----Original Message----- From: DvDmanDT [mailto:[EMAIL PROTECTED] Sent: Thursday, 28 August 2003 8:58 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: IS THIS A BUG? I also wanna add that it works for functions as well: $foo="bar"; $foo(); would call the function bar()... I read this in the manual at some point like a year ago... This isn't something I would recommend using as you could in 90% of the cases screw it all badly... Could be useful sometimes though (I got an example, but I'm a bit lazy...) -- // DvDmanDT MSN: [EMAIL PROTECTED] Mail: [EMAIL PROTECTED] "Steve Todd" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > Is it possible to define a variable, such as: > $foo = "bar"; > > and then do as follows to create a totally different variable: > $$foo = "text here"; > > this seems to mean $bar = "text here";. > > Is this a bug or can we legally use it. > > Steve > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __________ Information from NOD32 1.490 (20030820) __________ This message was checked by NOD32 for Exchange e-mail monitor. http://www.nod32.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php