I have a return string from a db.
The return string must be formatted in javascript.
<?php
$db = "this is a line
this is a new line";
?>
How would I convert the above to:
<?php $db = "this is a line
this is a new line"; ?>
Javascript:
<script>
var jdb = <?php echo $db; ?>
</script>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…