<script type="text/javascript">
$(document).ready(function() {
FACILITY_BOOKING.lst_festival_day = new Array();
<?php foreach($festival_day as $key => $val) { ?>
FACILITY_BOOKING.lst_festival_day.push('<?php echo $val; ?>');
<?php } ?>
});
</script>
<?php
// php array
$fruits = array('apple', 'orange', 'mango', 'banana', 'strawberry');
?>
<script type="text/javascript">
// use php implode function to build string for JavaScript array literal
var fruits = <?php echo '["' . implode('", "', $fruits) . '"]' ?>;
// ["apple", "orange", "mango", "banana", "strawberry"]
</script>
var ar = <?php echo '["' . implode('", "', $ar) . '"]' ?>;