how to send result array in javascript variable 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) . '"]' ?>;