Is there a way to show all rows in a database table without having to echo row[0] echo row [1] for each field? also how does one write code so it appears as code on a webpage. like it is done when u use the code button here?
//Make your query and store it in $result while ($row = mysql_fetch_assoc($result)) { echo $row['youFieldName']; } Code (markup):
As far as having code appear like it does on this webpage, you can surround it in <pre> tags to specify that it is preformated. IE: <pre> This text is formatted and breaks do not need to be added anywhere. </pre> Code (markup):