Jump to content

Table issues


mbh23

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.