' ' string literal contains an unescaped line break Error

Viewed 22273

I have a text in $faq['content']; and when i echo $faq['content'] this error is displayed in browser console:

' ' string literal contains an unescaped line break Error

My code:

<script>
setTimeout(function () {
$(".opencxbody").html('<div style="max-height:400px; overflow-y: scroll;"> <?php echo $faq['content']; ?></div>');
}, 100);
</script>
1 Answers

Please try again.

<script>
setTimeout(() => {
            let data = "<div style='max-height:400px; overflow-y: scroll;'>";
                data += "<?=$sss?>";
                data += "</div>";
            $(".opencxbody").html(data);
        }, 100);
</script>
Related