Re: mySQL table output...

From: Date: Tue, 25 May 2004 19:39:32 +0000
Subject: Re: mySQL table output...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-186940@lists.php.net to get a copy of this message
On 23-May-2004 Russell P Jones wrote: > I just want to print out a table from mySQL. Thats it. into an html > table. > > Column 1 | Col 2 | Col 3 > ------------------------- > Val 1 | val 2 | val 3 > Val 4 | val 5 | val 6 > > > any ideas on how to do this? > if ($res = mysql_query($qry)) { echo '<table>'; while ($row = mysql_fetch_array($res) echo '<tr><td>' .implode('</td><td>', $row) .'</td></tr>'; echo '</table>'; } Regards, -- Don Read dread@ispwest.net -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.

« previous php.general (#186940) next »