I would like to send a multiple line php string to a javascript variable but I am unaware how.
I know that javascript multiline strings must be escaped like this:
var string = "this multi \
line string";
I am currently sending php variables to javascript like this:
<?php echo "<script>var string=$phpstring</script>
Also, I bet a big part of this is that this string is PKCS7 encrypted. So I guess the format must be strict? I very new to this and I'm making some assumptions.
This however doesn't allow for multiline assignments. How would I accomplish this?
Thanks in advance!
I know that javascript multiline strings must be escaped like this:
var string = "this multi \
line string";
I am currently sending php variables to javascript like this:
<?php echo "<script>var string=$phpstring</script>
Also, I bet a big part of this is that this string is PKCS7 encrypted. So I guess the format must be strict? I very new to this and I'm making some assumptions.
This however doesn't allow for multiline assignments. How would I accomplish this?
Thanks in advance!
Last edited: