Andrew R Posted June 11, 2007 Share Posted June 11, 2007 How do I display results from a database in a particular format. For example the following text in this format including the lines in stored in the database: “Hello, Welcome to the news for 11/06/07. Thanks” When I echo the results using the usual, <? echo $row_news[‘news’]; ?> it doesn’t echo the information in the database in the format it is stored for example it will display like this. “Hello, Welcome to the news for 11/06/07. Thanks” How do I get it to display in the format it in displayed in the database? Thanks. Link to comment https://forums.phpfreaks.com/topic/55139-solved-displaying-results-from-database-in-a-particular-format/ Share on other sites More sharing options...
chigley Posted June 11, 2007 Share Posted June 11, 2007 echo nl2br($row_news["news"]); Link to comment https://forums.phpfreaks.com/topic/55139-solved-displaying-results-from-database-in-a-particular-format/#findComment-272577 Share on other sites More sharing options...
Andrew R Posted June 11, 2007 Author Share Posted June 11, 2007 Thank you Link to comment https://forums.phpfreaks.com/topic/55139-solved-displaying-results-from-database-in-a-particular-format/#findComment-272589 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.