send array in javascript function using php code example
Example: dump php array into javascript array
//in js do this
var masterarray = <?php echo '["' . implode('", "', $masterarray) . '"]' ?>;
//in js do this
var masterarray = <?php echo '["' . implode('", "', $masterarray) . '"]' ?>;