Make array flat
This commit is contained in:
parent
7e4d2915f4
commit
1071c0f4ae
1 changed files with 1 additions and 1 deletions
|
|
@ -85,7 +85,7 @@
|
|||
var places = <?php echo json_encode($locations); ?>;
|
||||
var map;
|
||||
var map_center = {lat: parseFloat(places[0]['lat']), lng: parseFloat(places[0]['lng']) };
|
||||
var traveler = <?php echo json_encode($traveler); ?>;
|
||||
var traveler = <?php echo json_encode(array_values($traveler)); ?>;
|
||||
for(var i=0; i<traveler.length; i++){
|
||||
var option = $('<option>'+traveler[i]+'</option>');
|
||||
$('#travelers-select').append(option);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue