<script type="text/javascript"> (...) var variablejavascript = "<?php echo $variablephp; ?>"; (...) </script>