I have a java alert and a text field in a mysql db.
The text in the field contains line breaks.
i.e.
Hello
World
I want to print/echo out the text into the java alertbox with out executing the line breaks, just showing them.
alert('[?php echo $row->text);?]'); <--- howto?
It should print
alert('Hello\nWorld');
insted of
alert('Hello
World');
Thanks in advance