I have to use addslashes on a string of mine so I can use it in a javascript
function, so that when a link is clicked, a html textarea box is populated
with that string.
The problem I have is that if there are line breaks in the string, the
<br>'s seem to get created when addslashes is run on the string, then in the
textarea box my string looks like:
i can't do that<br>right now<br>but maybe later<br>
How can I get the slashes escaped properly, but keep the same format? I
tried this:
$RESPONSE = eregi_replace('<br[[:space:]]*/?[[:space:]]*>', "\n",
$RESPONSE);
but it didn't work for me, it just kinda merged all the strings together, no
line breaks (or <br>'s) at all.
Thanks,
Chad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]