What is it that you want to do? Access a PHP variable in JavaScript? Or access a Javascript variable in PHP?
You can access a PHP variable in your Javascript like so:
[tt]var hello= "<?php echo $hello; ?>";[/tt]
But since the JavaScript variable doesn't exist until after the server has sent the code to the browser to be interpreted, there's no way of accessing a Javascript variable in PHP without resubmitting the page.
Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.