Possible Duplicate:
Pass a PHP string to a Javascript variable (including escaping newlines)
Hy, so my problem is that i have a textarea which is generated with jquery, like this:
$var input = $('<textarea name="somename"></textarea>');
$(something).after(input);
But i also want to fill this textarea with content (when content exists of course), using php. sp now my code looks like this:
$var input = $('<textarea name="somename"><?=$variabel[0][something];?</textarea>');
$(something).after(input);
So the problem with this is that when i run this code the javascript automatically fills the content of the textarea in that input variable, and because there is more than one line it breaks so i get an error saying "Unexpected token ILLEGAL"
I hope i explained it well, so i need somehow the put the content of the textarea inside that generated textarea, but in a way in which my input doesn't break.
Thans for any advice!