javascript - How to show a result of var_export() in a div container? -


this question has answer here:

i'm trying show result of var_export() in separate div container.

$value = var_export($myarray,true); echo "<script>$('#div_debug').html('$value');</script>"; 

and error:

syntaxerror: unterminated string literal

can me?

with ordinary strings code working fine, not th eresult of of var_dump/var_export

$value = var_export($myarray,true); echo '<div id="#div_debug">'.$value.'</div>'; 

or:

$value = var_export($myarray,true); echo "<script>$('#div_debug').html('.$value.');</script>";  

Comments