convert php array variable to javascript code example
Example 1: set array in javascript from php
//set array in javascript from php array
var jsarry = <?php echo '["' . implode('", "', $phparry) . '"]' ?>;
Example 2: dump php array into javascript array
//in js do this
var masterarray = <?php echo '["' . implode('", "', $masterarray) . '"]' ?>;