how to check php variable in javascript code example
Example: javascript access php variable
//passing PHP variable to JavaScript
var myJSVar = <?php echo json_encode($myPHPVar); ?>;
//passing PHP variable to JavaScript
var myJSVar = <?php echo json_encode($myPHPVar); ?>;