Posted by ashore on 04/27/07 14:35
Say I'm using a snippet like
$phpfoo = "a\nb\nc";
var jsfoo = "<?php echo $phpfoo;?>";
This errors out because JS sees the newline, and it needs to be
escaped somehow. (In my real case, $phpfoo came from MySQL, and it's
retrieved and displayed OK.)
What do you folks use in this kind of situation? Thanks, all.
AS
[Back to original message]
|