mbh23 Posted August 25, 2009 Share Posted August 25, 2009 I have a php table from mysql and i am trying to format the table so it appears like below heading | info heading | info Heading | info Right now the information is Heading | Heading | Heading | info | info | info | my alignment is echo"\n<table border ='1' align=left >"; Link to comment https://forums.phpfreaks.com/topic/171789-table-issues/ Share on other sites More sharing options...
trq Posted August 25, 2009 Share Posted August 25, 2009 Post some relevant code. Link to comment https://forums.phpfreaks.com/topic/171789-table-issues/#findComment-905835 Share on other sites More sharing options...
mbh23 Posted August 25, 2009 Author Share Posted August 25, 2009 echo"\n<table border ='1' align=left >"; echo"\n<tr><th >Heading</th>"; $query="select info from something"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ echo "\n <tr style='text-align:Center'>" ."\n <td >".number_format($row[info],0,".",",")."</td>"; echo "\n</td></tr>"; } echo"\n<table border ='1' align=left >"; echo"\n<tr><th >Heading</th>"; $query="select info from something"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ echo "\n <tr style='text-align:Center'>" ."\n <td >".number_format($row[info],0,".",",")."</td>"; echo "\n</td></tr>"; } echo"\n<table border ='1' align=left >"; echo"\n<tr><th >Heading</th>"; $query="select info from something"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ echo "\n <tr style='text-align:Center'>" ."\n <td >".number_format($row[info],0,".",",")."</td>"; echo "\n</td></tr>"; } Link to comment https://forums.phpfreaks.com/topic/171789-table-issues/#findComment-905853 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.