Ho to store multiline text in a javascript variable;
I am using PHP to assign value to javascript variable.
Please see a SAMPLE code below
<html>
<head>
<title> New Document </title>
<?php
$foo = " this is a
multiline statement";
?>
<script>
bar = '<?php print $foo;?>';
alert(bar);
</script>
</head>
<body>
</body>
</html>
I don't want to loose any white-space characters.How can this be done ?