S A N T A Posted May 19, 2008 Share Posted May 19, 2008 ok so i am trying to display all the users and heir emails that have registered on my site BUT i cant seem to get them in a table the table needs to be border 1 but i cant get it for some reason <?php $sql = "SELECT * FROM `users`"; $result = mysql_query($sql)or die(mysql_error()); while($row = mysql_fetch_assoc($result)) { echo "<table border="1"><tr><td> " . $row['username'] . " </td><td> "; <----- that is line 21 echo " " . $row['email'] . "</td></tr><br /><br />"; } ?> but i get the error Parse error: parse error, unexpected T_LNUMBER, expecting ',' or ';' in userdisplay.php on line 21 Link to comment https://forums.phpfreaks.com/topic/106336-solved-user-display-problem/ Share on other sites More sharing options...
BlueSkyIS Posted May 19, 2008 Share Posted May 19, 2008 you'll find life easier if you always single-quote HTML parameters. echo "<table border='1'><tr><td> " . $row['username'] . " </td><td> "; <----- that is line 21 Link to comment https://forums.phpfreaks.com/topic/106336-solved-user-display-problem/#findComment-544963 Share on other sites More sharing options...
S A N T A Posted May 19, 2008 Author Share Posted May 19, 2008 ok nvm i fixed it and i got it to work Link to comment https://forums.phpfreaks.com/topic/106336-solved-user-display-problem/#findComment-544964 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.