CommentApr 5, 2018
I got a solution $strmarkers[0] = array( 'lat' => -1.275292, 'lng' => 36.812072 ); $strmarkers[1] = array( 'lat' => -1.282243, 'lng' => 36.815677 ); $strmarkers[2] = array( 'lat' => -1.273801, 'lng' => 36.825859 ); ?> var mynewlocations = <?php echo json_encode($strmarkers, JSON_NUMERIC_CHECK); ?>