Jump to content

Recommended Posts

Posted

Hi, I am trying for 2 days to solve the code for the connection with all the Aiports and the Map. Where is the mistake?

// Print out rows
<?php
$airports = OperationsData::getAllAirports();
  /* Above <td> You have to put it */
foreach($airports as $airport) {
            "svgPath": targetSVG" ','
  echo '  "title": ' . $airport->name . ','
  echo '  "latitude": ' . $airport->lat . ','
  echo '  "longitude": ' . $airport->lng . ''
  echo " }";
} ?>

So I bring at least one airport ...

      {
        "svgPath": targetSVG,
        "title": "<?php echo $airport->name; ?>",
        "latitude": <?php echo $airport->lat; ?>,
        "longitude": <?php echo $airport->lng; ?>
      }, 
    ]
  },
                <?php
                }
                ?>

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...