[Solved] Acessing php variable using jquery [closed]
If the side is being processed through PHP (on the server) you can just use an echo <pre> <script> $(document).ready(function(){ var timeLeft = <?php echo 12796; ?>; console.log(timeLeft); }); </script> After PHP has processed the page it is just regular javascript as if you wrote it manually. You can also imagine the following example: <html> … Read more