how to send a js var to a php file code example Example: how to use php variable in javascript file <?php $bool = false; $num = 3 + 4; $str = "A string here"; ?>