hi every one
i have problem with javascript that generated using PHP i have a multiline string
that breaks using a <br> tag and at this position i get error by javascript
[COLOR=Silver]unterminated string literal syntax error
i put here my php code:
original text is here
<div style=”text-align: right;”>some text here <br>
next line is here<br>
third line is here<br>
</div>
“);
i am using => $body=ereg_replace(‘<br>’,’+”<br>”+’,$body);//$body contains the code
but the results is it
<div style=”text-align: right;”>some text here “+<br>”+
next line is here”+”<br>”
third line is here”+”<br>”
</div>
“);
i think i must do some to change it like below
[COLOR=SlateGray]<div style=”text-align: right;”>some text here “+<br>”+
“next line is here”+”<br>”+
“third line is here”+”<br>”+
</div>
“);
any idea to fix thes problem.
thanks in advance arqa.