aebstract Posted January 21, 2008 Share Posted January 21, 2008 <?php $color1 = "#dddddd"; $color2 = "#c0c0c0"; $row_count = 0; $parts .= "<table width=732 cellpadding=3><tr bgcolor=#b2b2b2 cellspacing=6><td width=10 align=center>L</td><td width=10 align=center><strong>R</td><td width=10 align=center></td><td width=10 align=center>LOC</td><td>Part Number</td><td>Description</td></tr><br />"; $result2 = mysql_query("SELECT * FROM parts WHERE MCHN='PH' ORDER BY LOC ASC") or DIE(mysql_error()); while($r2=mysql_fetch_array($result2)) { $loc=$r2["LOC"]; $pn=$r2["PN"]; $desc=$r2["DESC"]; $row_color = ($row_count % 2) ? $color1 : $color2; $parts .= "<tr cellspacing=6><td align=center>1</td><td align=center>2</td><td align=center>3</td><td align=center bgcolor=\"$row_color\">$loc</td><td bgcolor=\"$row_color\">$pn</td><td bgcolor=\"$row_color\">$desc</td></tr><br />"; $row_count++; } $parts .= "</table>"; $content .= " <p><u>$plantloc</u> - Paw Harvester</p> "; echo "$content"; echo "$parts"; ?> This script is causing a weird gap of blank space between $content & $parts and I don't see a reason for it to do so? Link to comment https://forums.phpfreaks.com/topic/87035-solved-script-causing-odd-gap/ Share on other sites More sharing options...
Nhoj Posted January 21, 2008 Share Posted January 21, 2008 My best guess is its because of the <p> (paragraph) tag. Link to comment https://forums.phpfreaks.com/topic/87035-solved-script-causing-odd-gap/#findComment-445097 Share on other sites More sharing options...
aebstract Posted January 21, 2008 Author Share Posted January 21, 2008 It was the line breaks at the end. I don't know why I put them at the end of the rows, but solved it. Link to comment https://forums.phpfreaks.com/topic/87035-solved-script-causing-odd-gap/#findComment-445098 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.