bundyxc Posted August 10, 2009 Share Posted August 10, 2009 My PHP is supposed to make three queries to my MySQL database, and put the results into tables, but the formatting keeps coming out all funky. TABLESTART should be at the top of each table.. but it doesn't work out how I thought. Note: Technically four queries, but the first has no output, as there are no matches. This is expected. <?php require('start.php'); if (isset($_SESSION['friendID'])) { echo $_SESSION['friendID']; if (isset($_GET['start'])) { $start = preg_replace('/[^0-9]/', '', $_GET['start']); } else { $start = 0; } // Set up the page navigation. if ($start > 0) { $next = $start + 18; $previous = $start - 18; $nav = "a"; } else { $start = 0; $next = 18; $nav = "b"; } echo "<br /><br />"; $trains = array( 'SELECT `friendID`, `img`, `superDays` FROM `users` WHERE `superDays` > 0 ORDER BY `superDays`', 'SELECT `friendID`, `img`, `firstLogin` FROM `users` ORDER BY `firstLogin` DESC LIMIT ' . $start . ', 48', 'SELECT `friendID`, `img`, `lastLogin` FROM `users` ORDER BY `lastLogin` DESC LIMIT ' . $start . ', 48', 'SELECT `friendID`, `img`, `points` FROM `users` ORDER BY `points` DESC LIMIT ' . $start . ', 48' ); $trainsCount = count($trains) - 1; // Select the last 3 users that have logged in. $num = 0; while ($num <= $trainsCount) { $trainSelect = mysql_query($trains[$num], $con) OR die(mysql_error()); $i = 0; $j = 0; while($data = mysql_fetch_assoc($trainSelect)) { //If this is the first row, start the table. if (($i == 0) && ($j == 0)) { echo 'TABLE START<br /><table><tr>'; } if ($_SESSION['friendID'] == $data['friendID']) { echo '<td><a href="verify.php?user=' . $data['friendID'] . '" target="_blank"><img src="' . $data['img'] . '" height="75" width="75" border="1px" style="opacity:0.20;filter:alpha(opacity=20)" /></a></td>'; } else { //Check to see if users are already friends. $addedSelect= mysql_query('SELECT * FROM `adds` WHERE (`adder` = \'' . $_SESSION['friendID'] . '\' OR `added` = \'' . $_SESSION['friendID'] . '\') AND (`adder` = \'' . $data['friendID'] . '\' OR `added` = \'' . $data['friendID'] . '\')',$con) or die(mysql_error()); //Count rows where users have added eachother. $addedSelectCheck = mysql_num_rows($addedSelect); if (($addedSelectCheck >= 1)) { //Users should already be friends. Make image semi-transparent. echo '<td><a href="verify.php?user=' . $data['friendID'] . '" target="_blank"><img src="' . $data['img'] . '" height="75" width="75" border="1px" style="opacity:0.10;filter:alpha(opacity=10)" /></a></td>'; } else { //Users are not yet friends. Show image like normal. echo '<td><a href="verify.php?user=' . $data['friendID'] . '" target="_blank"><img src="' . $data['img'] . '" height="75" width="75" border="1px solid green" /></a></td>'; } } //If that was the sixth column, and the eighth row, end the table. if (($i == 6) && ($j == ) { echo '</tr></table><br /><br /><br /><br />'; $i = 0; $j = 0; } //If that was the sixth column, and not the eighth row, end the row, and start a new one. elseif (($i == 6) && ($j != ) { echo '</tr><tr>'; $i = 0; $j++; } else { $i++; } } $num++; } } require('end.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="generator" content= "HTML Tidy for Linux/x86 (vers 11 February 2007), see www.w3.org" /> <title></title> </head> <body> Points reset has already occurred today.<br /> 44 minutes left until the next reset.<br /> 442500255<br /> <br /> TABLE START<br /> TABLE START<br /> TABLE START<br /> <table> <tr> <td><a href="verify.php?user=36792295" target="_blank"><img src= "http://c1.ac-images.myspacecdn.com/images01/10/s_88b55a8c0d10d957cb65132254580204.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=454286218" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=154711876" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=78505432" target="_blank"><img src= "http://c2.ac-images.myspacecdn.com/images01/106/s_c6cb2b85849bc8f4bc882fc5eca7f709.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=412506634" target="_blank"><img src= "http://c3.ac-images.myspacecdn.com/images02/88/s_938e329cb50a441584d81d23828dc1de.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=111135621" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/57/s_754d40c761df4646bacdd7b82052a447.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=285884988" target="_blank"><img src= "http://c3.ac-images.myspacecdn.com/images01/98/s_f07200c76ec016ed20e74773e4476afa.gif" height="75" width="75" border="1px solid green" /></a></td> </tr> <tr> <td><a href="verify.php?user=134256758" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=137662402" target="_blank"><img src= "http://b4.ac-images.myspacecdn.com/01544/43/12/1544222134_s.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=69276085" target="_blank"><img src= "http://c2.ac-images.myspacecdn.com/images01/103/s_3ed1b83dc3f1bb8cce4f6fff8f1fc209.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=135202806" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=6648886" target="_blank"><img src= "http://c2.ac-images.myspacecdn.com/images02/85/s_5b819c2f5546453e92c51ccb43fcc555.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=5170969" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/112/s_e51b9ff3771e472fba9b25d8d0e6479b.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=175126" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/5/s_2b3b24be5a444155b476c8990965cc2b.jpg" height="75" width="75" border="1px solid green" /></a></td> </tr> <tr> <td><a href="verify.php?user=4583929" target="_blank"><img src= "http://b3.ac-images.myspacecdn.com/00571/32/81/571191823_s.jpg" height="75" width= "75" border="1px solid green" /></a></td> <td><a href="verify.php?user=104607230" target="_blank"><img src= "http://b0.ac-images.myspacecdn.com/01217/00/37/1217337300_s.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=99510705" target="_blank"><img src= "http://c1.ac-images.myspacecdn.com/images02/65/s_b04da4dfe9644c2cb87572c1f0d009f0.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=2783399" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/81/s_945f366ed48d4db38661799737e6c653.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=180696173" target="_blank"><img src= "http://c3.ac-images.myspacecdn.com/images02/68/s_34e592a8703b4ae2b95ec58f445ce362.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=21802680" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/32/s_4822d97d927042079b7cfaac2148d8a7.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=1983872" target="_blank"><img src= "http://c1.ac-images.myspacecdn.com/images01/65/s_5237c03f9869ac041cb0f92a3d768634.jpg" height="75" width="75" border="1px solid green" /></a></td> </tr> <tr> <td><a href="verify.php?user=2457388" target="_blank"><img src= "http://c1.ac-images.myspacecdn.com/images02/101/s_fdb51f1f9b7f4d27af7238540e41f0c8.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=147646604" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/108/s_c306266ada124772ac407d602724aec3.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=5192452" target="_blank"><img src= "http://c2.ac-images.myspacecdn.com/images02/12/s_6f6df3eec91a4fdab6de1b7440b19a4d.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=266897795" target="_blank"><img src= "http://c2.ac-images.myspacecdn.com/images02/62/s_a74f2271afca414a9b5bbbd7ceb4e6d5.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=153285426" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=297714038" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=493350462" target="_blank"><img src= "http://c3.ac-images.myspacecdn.com/images02/101/s_f6eaf59f73dc4f199c1c65cf3642d4ea.jpg" height="75" width="75" border="1px solid green" /></a></td> </tr> <tr> <td><a href="verify.php?user=442500255" target="_blank"><img src= "http://c1.ac-images.myspacecdn.com/images02/61/s_ce84f12d1de342d4b48acdab2112de30.jpg" height="75" width="75" border="1px" style= "opacity:0.20;filter:alpha(opacity=20)" /></a></td> <td><a href="verify.php?user=82168532" target="_blank"><img src= "http://b8.ac-images.myspacecdn.com/01438/85/62/1438102658_s.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=6866631" target="_blank"><img src= "http://b8.ac-images.myspacecdn.com/00051/86/76/51126768_s.jpg" height="75" width= "75" border="1px solid green" /></a></td> </tr> <tr> <td><a href="verify.php?user=36792295" target="_blank"><img src= "http://c1.ac-images.myspacecdn.com/images01/10/s_88b55a8c0d10d957cb65132254580204.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=454286218" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=154711876" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=78505432" target="_blank"><img src= "http://c2.ac-images.myspacecdn.com/images01/106/s_c6cb2b85849bc8f4bc882fc5eca7f709.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=412506634" target="_blank"><img src= "http://c3.ac-images.myspacecdn.com/images02/88/s_938e329cb50a441584d81d23828dc1de.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=111135621" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/57/s_754d40c761df4646bacdd7b82052a447.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=285884988" target="_blank"><img src= "http://c3.ac-images.myspacecdn.com/images01/98/s_f07200c76ec016ed20e74773e4476afa.gif" height="75" width="75" border="1px solid green" /></a></td> </tr> <tr> <td><a href="verify.php?user=134256758" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=137662402" target="_blank"><img src= "http://b4.ac-images.myspacecdn.com/01544/43/12/1544222134_s.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=69276085" target="_blank"><img src= "http://c2.ac-images.myspacecdn.com/images01/103/s_3ed1b83dc3f1bb8cce4f6fff8f1fc209.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=135202806" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=6648886" target="_blank"><img src= "http://c2.ac-images.myspacecdn.com/images02/85/s_5b819c2f5546453e92c51ccb43fcc555.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=5170969" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/112/s_e51b9ff3771e472fba9b25d8d0e6479b.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=175126" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/5/s_2b3b24be5a444155b476c8990965cc2b.jpg" height="75" width="75" border="1px solid green" /></a></td> </tr> <tr> <td><a href="verify.php?user=4583929" target="_blank"><img src= "http://b3.ac-images.myspacecdn.com/00571/32/81/571191823_s.jpg" height="75" width= "75" border="1px solid green" /></a></td> <td><a href="verify.php?user=104607230" target="_blank"><img src= "http://b0.ac-images.myspacecdn.com/01217/00/37/1217337300_s.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=99510705" target="_blank"><img src= "http://c1.ac-images.myspacecdn.com/images02/65/s_b04da4dfe9644c2cb87572c1f0d009f0.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=2783399" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/81/s_945f366ed48d4db38661799737e6c653.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=180696173" target="_blank"><img src= "http://c3.ac-images.myspacecdn.com/images02/68/s_34e592a8703b4ae2b95ec58f445ce362.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=21802680" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/32/s_4822d97d927042079b7cfaac2148d8a7.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=1983872" target="_blank"><img src= "http://c1.ac-images.myspacecdn.com/images01/65/s_5237c03f9869ac041cb0f92a3d768634.jpg" height="75" width="75" border="1px solid green" /></a></td> </tr> <tr> <td><a href="verify.php?user=2457388" target="_blank"><img src= "http://c1.ac-images.myspacecdn.com/images02/101/s_fdb51f1f9b7f4d27af7238540e41f0c8.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=147646604" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/108/s_c306266ada124772ac407d602724aec3.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=5192452" target="_blank"><img src= "http://c2.ac-images.myspacecdn.com/images02/12/s_6f6df3eec91a4fdab6de1b7440b19a4d.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=266897795" target="_blank"><img src= "http://c2.ac-images.myspacecdn.com/images02/62/s_a74f2271afca414a9b5bbbd7ceb4e6d5.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=153285426" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=297714038" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=493350462" target="_blank"><img src= "http://c3.ac-images.myspacecdn.com/images02/101/s_f6eaf59f73dc4f199c1c65cf3642d4ea.jpg" height="75" width="75" border="1px solid green" /></a></td> </tr> <tr> <td><a href="verify.php?user=442500255" target="_blank"><img src= "http://c1.ac-images.myspacecdn.com/images02/61/s_ce84f12d1de342d4b48acdab2112de30.jpg" height="75" width="75" border="1px" style= "opacity:0.20;filter:alpha(opacity=20)" /></a></td> <td><a href="verify.php?user=82168532" target="_blank"><img src= "http://b8.ac-images.myspacecdn.com/01438/85/62/1438102658_s.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=6866631" target="_blank"><img src= "http://b8.ac-images.myspacecdn.com/00051/86/76/51126768_s.jpg" height="75" width= "75" border="1px solid green" /></a></td> </tr> <tr> <td><a href="verify.php?user=135202806" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=69276085" target="_blank"><img src= "http://c2.ac-images.myspacecdn.com/images01/103/s_3ed1b83dc3f1bb8cce4f6fff8f1fc209.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=137662402" target="_blank"><img src= "http://b4.ac-images.myspacecdn.com/01544/43/12/1544222134_s.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=134256758" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=285884988" target="_blank"><img src= "http://c3.ac-images.myspacecdn.com/images01/98/s_f07200c76ec016ed20e74773e4476afa.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=111135621" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/57/s_754d40c761df4646bacdd7b82052a447.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=412506634" target="_blank"><img src= "http://c3.ac-images.myspacecdn.com/images02/88/s_938e329cb50a441584d81d23828dc1de.jpg" height="75" width="75" border="1px solid green" /></a></td> </tr> <tr> <td><a href="verify.php?user=78505432" target="_blank"><img src= "http://c2.ac-images.myspacecdn.com/images01/106/s_c6cb2b85849bc8f4bc882fc5eca7f709.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=154711876" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=454286218" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=36792295" target="_blank"><img src= "http://c1.ac-images.myspacecdn.com/images01/10/s_88b55a8c0d10d957cb65132254580204.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=62850469" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images01/123/s_026536c335378664a219b05f01be9fdf.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=34352332" target="_blank"><img src= "http://b4.ac-images.myspacecdn.com/00273/47/91/273541974_s.jpg" height="75" width= "75" border="1px solid green" /></a></td> <td><a href="verify.php?user=175126" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/5/s_2b3b24be5a444155b476c8990965cc2b.jpg" height="75" width="75" border="1px solid green" /></a></td> </tr> <tr> <td><a href="verify.php?user=4583929" target="_blank"><img src= "http://b3.ac-images.myspacecdn.com/00571/32/81/571191823_s.jpg" height="75" width= "75" border="1px solid green" /></a></td> <td><a href="verify.php?user=297714038" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=442500255" target="_blank"><img src= "http://c1.ac-images.myspacecdn.com/images02/61/s_ce84f12d1de342d4b48acdab2112de30.jpg" height="75" width="75" border="1px" style= "opacity:0.20;filter:alpha(opacity=20)" /></a></td> <td><a href="verify.php?user=82168532" target="_blank"><img src= "http://b8.ac-images.myspacecdn.com/01438/85/62/1438102658_s.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=493350462" target="_blank"><img src= "http://c3.ac-images.myspacecdn.com/images02/101/s_f6eaf59f73dc4f199c1c65cf3642d4ea.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=153285426" target="_blank"><img src= "images/no_pic.gif" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=266897795" target="_blank"><img src= "http://c2.ac-images.myspacecdn.com/images02/62/s_a74f2271afca414a9b5bbbd7ceb4e6d5.jpg" height="75" width="75" border="1px solid green" /></a></td> </tr> <tr> <td><a href="verify.php?user=5192452" target="_blank"><img src= "http://c2.ac-images.myspacecdn.com/images02/12/s_6f6df3eec91a4fdab6de1b7440b19a4d.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=147646604" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/108/s_c306266ada124772ac407d602724aec3.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=2457388" target="_blank"><img src= "http://c1.ac-images.myspacecdn.com/images02/101/s_fdb51f1f9b7f4d27af7238540e41f0c8.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=1983872" target="_blank"><img src= "http://c1.ac-images.myspacecdn.com/images01/65/s_5237c03f9869ac041cb0f92a3d768634.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=21802680" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/32/s_4822d97d927042079b7cfaac2148d8a7.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=180696173" target="_blank"><img src= "http://c3.ac-images.myspacecdn.com/images02/68/s_34e592a8703b4ae2b95ec58f445ce362.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=2783399" target="_blank"><img src= "http://c4.ac-images.myspacecdn.com/images02/81/s_945f366ed48d4db38661799737e6c653.jpg" height="75" width="75" border="1px solid green" /></a></td> </tr> <tr> <td><a href="verify.php?user=99510705" target="_blank"><img src= "http://c1.ac-images.myspacecdn.com/images02/65/s_b04da4dfe9644c2cb87572c1f0d009f0.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=104607230" target="_blank"><img src= "http://b0.ac-images.myspacecdn.com/01217/00/37/1217337300_s.jpg" height="75" width="75" border="1px solid green" /></a></td> <td><a href="verify.php?user=139480978" target="_blank"><img src= "http://c2.ac-images.myspacecdn.com/images01/109/s_bd1936ad370f564f4579dc674227c961.jpg" height="75" width="75" border="1px solid green" /></a></td> </tr> </table> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/169589-php-table-unexpected-output/ Share on other sites More sharing options...
bundyxc Posted August 10, 2009 Author Share Posted August 10, 2009 Bumping from page 2. Quote Link to comment https://forums.phpfreaks.com/topic/169589-php-table-unexpected-output/#findComment-894876 Share on other sites More sharing options...
jarvis Posted August 10, 2009 Share Posted August 10, 2009 Aren't you missing a close tag for the table? //If that was the sixth column, and the eighth row, end the table. if (($i == 6) && ($j == ) { echo '</tr></table><br /><br /><br /><br />'; $i = 0; $j = 0; } So I can see you've ended the table here, however, you then go to: //If that was the sixth column, and not the eighth row, end the row, and start a new one. elseif (($i == 6) && ($j != ) { echo '</tr><tr>'; $i = 0; $j++; } else { $i++; } There after there isn't a close tag - am only looking quickly so apologies if not! Quote Link to comment https://forums.phpfreaks.com/topic/169589-php-table-unexpected-output/#findComment-894886 Share on other sites More sharing options...
bundyxc Posted August 10, 2009 Author Share Posted August 10, 2009 No, I don't believe so. That first code says "Hey, if that was the last column, and the last row.. then go ahead and close the table." Second code: "If that was the last column, but we still have more rows to go, then just end the current row and start another one." Third one: "We haven't even finished this row. Just throw in another column of data." However, I could be wrong. It's happened before. Quote Link to comment https://forums.phpfreaks.com/topic/169589-php-table-unexpected-output/#findComment-894890 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.