I have some text in a mysql table, stored as text and taken from an html <textarea>.
For example of some text. Hi this is Glens webpage
When I display this on my web page it comes out as
Hi this is Gles webpage.
How do I get it to display with the newlines?
Here is the code.
while($info = mysql_fetch_array( $data )) { $date = $info["date"]; $date = strftime("%b %d, 20%y", strtotime($date)); echo "<span class='span2'>"; echo "<p>"; echo $info['title']; echo "......".$date; echo $info['content']; echo "</p>"; echo "</span>"; echo "<br />";
Thanks for looking.................
echo nl2br($info['content']);
Ahhhhhhhhhhhhh thats it!
Many thanks.................