Posted by Rik on 06/06/06 16:19
tony@tony.com wrote:
> Am I being a bit dense again?
> How do I use variables created in PHP with javascript?
Echo them in a script block to the HTML.
$variable = 'something';
echo <<<JS
<script type="text/javascript">
var myVar = '$variable';
</script>
JS;
Grtz,
--
Rik Wasmus
[Back to original message]
|