I want to echo the variable when I use test(); fuction. I meanwhen I use the variable with this function like test(john) , how to use it in that php snippet. Anyone knows ?
<script type="text/javascript">
function test(){
document.getElementById("php_code").innerHTML="
<?php echo "hello"; ?>
";
}
</script>