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"; } ?> Link to comment https://forums.phpfreaks.com/topic/249843-not-printing-a-n/ 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 /> Link to comment https://forums.phpfreaks.com/topic/249843-not-printing-a-n/#findComment-1282405 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.