I'm using JavaScript to pop up a window and then display some PHP variables in the window. To do that, I'm using code like this:
var text="<?php echo $php_text; ?>";
Once processed by the server, this translates to:
var text="contents of the $php_text string variable";
My problem is that sometimes $php_text is a string of several hundred characters; in that event, the contents of $php_text "breaks" over one or more lines and causes errors with the JavaScript interpreter. How do I fix this problem? Thanks.
--Jeff