assign php array into javascript

Solutions on MaxInterview for assign php array into javascript by the best coders in the world

showing results for - "assign php array into javascript"
Joshua
31 Apr 2016
1<script type="text/javascript">
2
3	$(document).ready(function() {
4      FACILITY_BOOKING.lst_festival_day = new Array();
5      <?php foreach($festival_day as $key => $val) { ?>
6        FACILITY_BOOKING.lst_festival_day.push('<?php echo $val; ?>');
7      <?php } ?>
8    });
9</script>