sh0wtym3 Posted January 6, 2009 Share Posted January 6, 2009 Hey all, Seemingly simply question, I want to take the results I get from the query below: //Show the database results $query = "SELECT * FROM mail"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { echo "{$row['fname']} {$row['lname']}<br>" . "<b>{$row['email']}</b><br><br>"; } ... and number them. For example: 1. fname lname email 2. fname lname email 3. fname lname email Can somebody please point me in the right direction? Normally I'd google it, but I'm not even sure what this function is called. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Zhadus Posted January 6, 2009 Share Posted January 6, 2009 For future reference, it is HTML. Ordered listing. //Show the database results echo "<ol>"; $query = "SELECT * FROM mail"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { echo "<li>{$row['fname']} {$row['lname']}<br>" . "<b>{$row['email']}</b></li>"; } echo "</ol>"; Quote Link to comment Share on other sites More sharing options...
sh0wtym3 Posted January 6, 2009 Author Share Posted January 6, 2009 Sweet, it works. Thanks. Quote Link to comment 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.