Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output in PHP

Status
Not open for further replies.

ashz

Programmer
Dec 9, 2002
43
ES
Hi,

The script below generates sheets of data, how can I create line between each Field and how can I make a border line and a space between records.

Thanks.

for($i=0; $i <= $count; $i++)
{
echo ' <b>'.$str_Fields[$i]. '</b> '. $row[$str_Fields[$i]];
echo &quot;<br><br>\n&quot;;
}
 
echo ('<table>');
for($i=0; $i <= $count; $i++)
{
echo ('<tr><td></b>'.$str_Fields[$i]. '</b>&nbsp;'.$row[$str_Fields[$i]].'</tr></td>');
}
echo ('</table>');
 
irzyxel:

Your post won't work. Without the &quot;border=<some value other than 0>&quot; attribute of the table tag, most browsers won't output the lines ashz wants.

Also, you're never opening your bold tag. You close it twice. Want the best answers? Ask the best questions: TANSTAAFL!
 
blah

echo ('<table border=&quot;1&quot;>');
for($i=0; $i <= $count; $i++)
{
echo ('<tr><td><b>'.$str_Fields[$i]. '</b>'.$row[$str_Fields[$i]].'</td></tr>');
}
echo ('</table>');

or maybe even

echo ('<table border=&quot;1&quot;>');
for($i=0; $i <= $count; $i++)
{
echo ('<tr><td><b>'.$str_Fields[$i].'</b></td><td>'
.$row[$str_Fields[$i]].'</td></tr>');
}
echo ('</table>');
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top