mrjameer Posted January 2, 2007 Share Posted January 2, 2007 hi,i want to fetch all records from mysql table and print every record as html table using php.but when i fetch the records,it will displays as one table only.but i want to display one record as one table.i dont need to print field names.please any of your help will be appreciated.thanksmrjameer Link to comment https://forums.phpfreaks.com/topic/32578-print-every-record-as-table/ Share on other sites More sharing options...
kenrbnsn Posted January 2, 2007 Share Posted January 2, 2007 Please post the non-working code between [nobbc][code][/code][/nobbc] tags.Ken Link to comment https://forums.phpfreaks.com/topic/32578-print-every-record-as-table/#findComment-151498 Share on other sites More sharing options...
Psycho Posted January 2, 2007 Share Posted January 2, 2007 After you have performed your query just do the following:[code=php:0]while ($record = mysql_fetch_assoc($result)) { echo "<table><tr>"; echo "<td>".$record['columnname1']."</td>"; echo "<td>".$record['columnname2']."</td>"; echo "<td>".$record['columnname3']."</td>"; echo </tr></table>";}[/code] Link to comment https://forums.phpfreaks.com/topic/32578-print-every-record-as-table/#findComment-151535 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.