Re: Displaying Results on different rows in tables

From: Date: Thu, 18 Jan 2007 22:58:08 +0000
Subject: Re: Displaying Results on different rows in tables
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-247369@lists.php.net to get a copy of this message
Dan Shirah wrote:
The code above displays no information at all. What I want to do is: 1. Retrieve my information 2. Assign it to a variable 3. Output the data into a table with each unique record in a seperate row
As Brad posted: echo "<table>"; while ($row = mssql_fetch_array($result)) { $id = $row['credit_card_id']; $dateTime = $row['date_request_received']; echo "<tr><td>$id</td><td>$dateTime</td></tr>"; } echo "</table>"; If that doesn't work, try a print_r($row) inside the loop: while ($row = mssql_fetch_array($result)) { print_r($row); } and make sure you are using the right id's / elements from that array. -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#247369) next »