how to pass variable from php to javascript code example
Example: php pass a variabele to js
<script>
'var name = <?php echo json_encode($name); ?>;
</script>'
<script>
'var name = <?php echo json_encode($name); ?>;
</script>'