vipsa Posted October 26, 2011 Share Posted October 26, 2011 I have the following php script and get data from a database and prints in on a page however it does not print a carriage return. Why can this be? The script: <?php include "database.inc"; mysql_select_db("php", $connection); $result = mysql_query("SELECT * FROM orders", $connection); while ($row = mysql_fetch_array($result, MYSQL_NUM)) { foreach ($row as $attribute) print "($attribute)"; print "\n"; } ?> Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted October 26, 2011 Share Posted October 26, 2011 \n new line characters are for plain-text documents.. use <br /> 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.