A better way of displaying query

From: Date: Tue, 01 Aug 2000 22:58:45 +0000
Subject: A better way of displaying query
Groups: php.general 
Request: Send a blank email to php-general+get-9595@lists.php.net to get a copy of this message
I'm following an example in PHP essentials that shows how to display mysql database info in a HTML table. What I need to display is a mysql table that has over 20 columns and I want to know an easier way. Here is an example of what I have. while ($row = mysql_fetch_array($sql_result)) { $item1 = $row["item1"]; $item2 = $row["item2"]; $item3 = $row["item3"]; $item4 = $row["item4"]; etc,etc,etc echo "<TR><TD>$item1</TD><TD>$item2</TD><TD>$item3</TD><TD>$item4</TD> etc,etc,etc } Is there a better way? Such as: while ($row = mysql_fetch_array($sql_result)) { $items = $row["*"]; Thanks, Mike Tuller

« previous php.general (#9595) next »