RE: [PHP-DB] nested variables???????

From: Date: Fri, 19 May 2000 16:26:04 +0000
Subject: RE: [PHP-DB] nested variables???????
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-52@lists.php.net to get a copy of this message
you coudl retrieve your word, say test and do if word is currently held in a variable called $a $expr="\$$a"; $result=eval($expr); $result will hold the value of $test in your case Liz PS = the \$ is essential > -----Original Message----- > From: nooyen [mailto:nooyen@home.nl] > Sent: Friday, May 19, 2000 17:20 > To: php-db@lists.php.net > Subject: [PHP-DB] nested variables??????? > > > > Hi all. > > I have a word from a text file.....f.e. "test" > > Now i want to change this word INTO the > variable test > (so this > word must become > the VALUE of the variable test, which already (also > happen to) > exists. > > So, i get the word from the text file.......put a $ > sign in front > of it and then > i have $test as a WORD.........but how can i get it > to have the > value of the variable $test (which does exist). > > THANKS for an answer up ahead! > > Rudy > >

« previous php.db (#52) next »