Posted by Nyoka on 12/17/46 11:53
You could write your own function similar to:
function convertArray ($array) {
foreach ($array AS $name => $value) {
global $$name;
$$name = $value;
}
}
Make sure you do a print_r ($array) before using this so you are away
of what variables are going to be used.
monomaniac21 wrote:
> 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
Navigation:
[Reply to this message]
|