On Sat, Dec 06, 2003 at 09:34:24AM -0500, Randy Johnson wrote: > I have a query > > $query="select a,b,c,d,e from table where id='z'"; > $result=mysql_query(); > > $query_data=mysql_fetch_array($result); > > I normally would do this: > > $a=$query_data["a"]; > etc.. > > is there a way to do this is in a loop so I do not have to do all that > typing?
use list (http://www.php.net/list) list ($a, $b, $c, $d, $e) = mysql_fetch_row($result); -- zhuravlev alexander u l s t u n o c ([EMAIL PROTECTED]) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php