Jump to content

Just can't find where a (>) is coming from


crmamx

Recommended Posts

<!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

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.

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.