Re: Re: Variables in Variables?
| From: | Jasper Bryant-Greene | Date: | Sat, 19 Nov 2005 01:53:29 +0000 |
| Subject: | Re: Re: Variables in Variables? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-226096@lists.php.net to get a copy of this message | ||
Jasper Bryant-Greene wrote:
Ben wrote:Ah, sorry, I see what I missed now... Still, I'm sure there's a way to do this without resorting to eval()...$dbVars=explode(',',$two_vars); // Assuming comma seperator foreach($dbVars AS $key => $value) {WTF do you need eval() for?! $dbVars = explode( ',', $two_vars ); foreach( $dbVars as $value ) {$eval="\$temp=".$value.";"; eval($eval); echo $temp;}echo $value;}