Posted by Kimmo Laine on 12/17/21 11:53
"Hans 'pritaeas' Pollaerts" <pritaeas@hotmail.com> wrote in message
news:e9nmo0$6un$1@news3.zwoll1.ov.home.nl...
> Maybe this works (untested):
>
> $row = mysql_fetch_array($result);
> foreach ($row as $name => $value) {
> $eval = "${$name} = $value";
> eval ($eval);
> }
No reason to get eval involved.
This:
foreach($row as $name => $value)
$$name = $value;
works just fine.
--
"ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)
[Back to original message]
|