2015-12-10 PHPからjavascriptに値を渡す方法 PHP 下記のようにPHPの値をjavascriptに書き込んで使用します。 <script> var i=<?php echo $i; ?>; </script>