I currently have a MySQL table called _post and i have a column called message (TEXT)
When i insert a row into the table the text looks like this in phpmyadmin
This is Correct How I Want It To Display
How much do you use your computer?
You might be spending to much time.....
But when i echo it out of the database it looks like this
How much do you use your computer? You might be spending to much time.....
Thank You
You should use something like nl2br() function.
Looks like you need to convert (newlines) to
<br>
s.
Since your output is processed as HTML you won't see the newlines that are present in your database. In HTML you need a <br>
-tag to display a newline in your browser.
PHP has a function that converts any newline to a <br>
-tag for you: nl2br()
You can use the nl2br() function to display your data.
Example:
echo nl2br($mysql_text);
Regards