Can't Add New Lines In Javascript Alert Box?
I'm generating a string in PHP and then eventually passing this string into a JavaScript alert box, my problem is I actually can't add line breaks in my alert box. My code looks as
Solution 1:
This happens because PHP interprets the \n before JavaScript has the chance to, resulting in a real line break inside the Javascript code. Try
\\n
Post a Comment for "Can't Add New Lines In Javascript Alert Box?"