I tried to echo out the divs on js such as
$("#id").append("<?php echo $var_with_multi_div;?>")
But since with div are printed on a new line the console gives error -
Uncaught SyntaxError: missing ) after argument list
So, how can I print the PHP variable on a specific element of the HTML page using JS? Is there any method to append as a child on an element without JS?