Posted by Hans 'pritaeas' Pollaerts on 12/07/33 11:53
Maybe this works (untested):
$row = mysql_fetch_array($result);
foreach ($row as $name => $value) {
$eval = "${$name} = $value";
eval ($eval);
}
"monomaniac21" <mcyi2mr3@googlemail.com> wrote in message
news:1153390678.605323.145130@h48g2000cwc.googlegroups.com...
> hi all
>
> is there a function to convert all values of array $row into seperate
> variables:
>
> $row = mysql_fetch_array($result);
>
> // i dont want to have to do this anymore :-)
>
> $name = $row['name'];
> $address1 = $row['address1'];
> $address2 = $row['address2'];
> etc etc etc
>
>
>
>
> Regards
>
> marc
>
[Back to original message]
|