this question has answer here:
- how pass variables , data php javascript? 17 answers
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
Post a Comment