Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

assign php array into javascript

<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>
 
PREVIOUS NEXT
Tagged: #assign #php #array #javascript
ADD COMMENT
Topic
Name
2+7 =