I have a few Text Area input fields when I want to allow my users to enter text with hard returns. On my process page, I am using:
$Note = addslashes(nl2br($_POST['Note']));
to convert the strings to be able to be pushed to my mySQL DB. This functions great. I, also, display the fields on a few PHP pages and everything looks great.
My problem (not really a problem - I just need to learn this), I have an EDIT page where I need to be able to update the value.
When I use:
<textarea name="Lyrics" cols="88" rows="30"><? echo $row['Lyrics']; ?></textarea>
the <br \> tags are returned.
Really, I just need an OPPOSITE function to the nl2br() that will return the string back into the text area input field the way the user inputted it before submitting it.
maybe a br2nl() function
I hope this makes sense. Thanks!