you would need to have the javascript with the php in the same file so it would be something like this
<?php $var = testing; ?> <script type="text/javascript"> $(function () { $("#someDiv").append("Some value is:<b><?php $var ?></b>"); }); </script> Nikola wrote:
Hello, I am trying to figure out how to .append a php session $var to a given div. I'm not sure what the correct syntax is. I was trying something along the lines of how I'd display the var in HTML: $("#someDiv").append("Some value is:<b>'.$var.'</b>"); I'm not sure the best way to go about this. Any input is appreciated. Thanks much.