|
Posted by Jasper Bryant-Greene on 10/18/09 11:32
Jasper Bryant-Greene wrote:
> Ben wrote:
>>
>> $dbVars=explode(',',$two_vars); // Assuming comma seperator
>> foreach($dbVars AS $key => $value) {
>> $eval="\$temp=".$value.";";
>> eval($eval);
>> echo $temp;
>> }
>
> WTF do you need eval() for?!
>
> $dbVars = explode( ',', $two_vars );
> foreach( $dbVars as $value ) {
> echo $value;
> }
Ah, sorry, I see what I missed now... Still, I'm sure there's a way to
do this without resorting to eval()...
Navigation:
[Reply to this message]
|