Hey all,
I have a field in my table called 'message'. Now when i write to this field i do:
"UPDATE tablename SET message='".nl2br($msgcontent)."'"
This then replaces any newlines with '<br />' .
Now... when i grab this value back and try to put it into a textarea i get a javascript error:
'Unterminated string constant'
I just can't figure out how to solve this. I've tried to do a:
str_replace("<br />", "\n", $msgcontent);
But that didnt work.
Anyone got any suggestions please?? Many Thanks,
BIOSTALL