transform echo php to array 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: php array to js
var arrNums = json_encode(<?php echo $arrNums; ?>);