I have an authors bio field in a mysql database. I use addslashes() to store it. When I go back to the original input form I use stripslashes() on ad a textarea to display and edit it. Works great.

Now I want to just show the data on a webpage and not in a input field. If I use

echo stripslashes($authorsbio);

It looses the paragraph spacing.

What magic funtion (looked in the documentation) do I use to keep the formatting of the text field using just echo?

TIA

    If by "formatting" you mean the linebreaks, [man]nl2br[/man].

      Write a Reply...