You are here: Re: converting array $row values to $string « PHP Programming Language « IT news, forums, messages
Re: converting array $row values to $string

Posted by Hans 'pritaeas' Pollaerts on 12/17/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
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация