crmamx Posted February 16, 2011 Share Posted February 16, 2011 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <?php // Connect to database================================================== include("connect_db.php"); // sending query =========================================================== $result = mysql_query("SELECT * FROM members Order By last") or die(mysql_error()); if (!$result) { die("Query to show fields from table failed"); } echo "<br />"; echo "<p>MEMBERS LIST</p>"; echo "<table border='10' cellpadding='3' cellspacing='2'>"; echo "<tr><th>First Name</th><th>Last Name</th>><th>Phone</th><th>Email</th></tr>"; // keeps getting the next row until there are no more to get ================ while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table ========================== echo "<tr><td>"; echo $row['first']; echo "</td><td>"; echo $row['last']; echo "</td><td>"; echo $row['phone']; echo "</td><td>"; echo $row['email']; echo "</td></tr>"; } echo "</table>"; ?> </body> </html> This is the output. MEMBERS LIST > First Last Phone Email data data data data ect............................................................... I cannot find where the > (greater than) sign is coming from. There is a space after MEMBERS LIST but I could not get it to work in this display. Link to comment https://forums.phpfreaks.com/topic/227825-just-cant-find-where-a-is-coming-from/ Share on other sites More sharing options...
Pikachu2000 Posted February 16, 2011 Share Posted February 16, 2011 Here ya go: echo "<tr><th>First Name</th><th>Last Name</th>><th>Phone</th><th>Email</th></tr>"; Link to comment https://forums.phpfreaks.com/topic/227825-just-cant-find-where-a-is-coming-from/#findComment-1174821 Share on other sites More sharing options...
crmamx Posted February 16, 2011 Author Share Posted February 16, 2011 Unbelievable! And so it throws the extra > out and prints it BEFORE it starts the table. Even at that I counted the < and > in that echo command a dozen times. I think sometimes I just need to put it to bed and come back the next day. Link to comment https://forums.phpfreaks.com/topic/227825-just-cant-find-where-a-is-coming-from/#findComment-1174823 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.