php array to js
snippet in php

php array to js

user1784

var arrNums = json_encode(<?php echo $arrNums; ?>);

dump php array into javascript array

user5983

//in js do this
var masterarray =  <?php echo '["' . implode('", "', $masterarray) . '"]' ?>;