Jump to content

Airport Database


ProSkyDesign

Recommended Posts

  • Moderators
On 13/2/2017 at 10:04 PM, mayconfdsm said:

Hi! 

You can call the function, 


<?php
$airports = OperationsData::getAllAirports()
  /* Above <td> You have to put it */
foreach($airports as $airport)
  /* On <td> You can use it to show Name, ICAO and anothers thing from PhpMyAdmin */
echo $airport->name;  
echo $airport->icao;   


?>

I have the following error :(

Parse error: syntax error, unexpected 'foreach' (T_FOREACH) in /home1/mcfilmsp/public_html/crewcenter/core/pages/aeropuertos.php on line 4

Link to comment
Share on other sites

32 minutes ago, joooseb said:

I have the following error :(

Parse error: syntax error, unexpected 'foreach' (T_FOREACH) in /home1/mcfilmsp/public_html/crewcenter/core/pages/aeropuertos.php on line 4

Sorry, I've forgot { } 

<?php
$airports = OperationsData::getAllAirports(){
  /* Above <td> You have to put it */
foreach($airports as $airport)
  /* On <td> You can use it to show Name, ICAO and anothers thing from PhpMyAdmin */
echo $airport->name;  
echo $airport->icao;   

}
?>
Link to comment
Share on other sites

  • Moderators
11 hours ago, mayconfdsm said:

Sorry, I've forgot { } 


<?php
$airports = OperationsData::getAllAirports(){
  /* Above <td> You have to put it */
foreach($airports as $airport)
  /* On <td> You can use it to show Name, ICAO and anothers thing from PhpMyAdmin */
echo $airport->name;  
echo $airport->icao;   

}
?>

It doesn't works :(

I want to put in a simple page (/index.php/pages/aeropuertos) but now the error is:

Parse error: syntax error, unexpected '{' in /home1/mcfilmsp/public_html/crewcenter/core/pages/aeropuertos.php on line 2

Link to comment
Share on other sites

  • Moderators
10 hours ago, web541 said:

Forgot a {


<?php
$airports = OperationsData::getAllAirports(){
  /* Above <td> You have to put it */
foreach($airports as $airport) {
  /* On <td> You can use it to show Name, ICAO and anothers thing from PhpMyAdmin */
echo $airport->name;  
echo $airport->icao;   

}
?>

 

Same error :(


Parse error: syntax error, unexpected '{' in /home1/mcfilmsp/public_html/crewcenter/core/pages/aeropuertos.php on line 2

Link to comment
Share on other sites

<?php
$airports = OperationsData::getAllAirports();
  /* Above <td> You have to put it */
foreach($airports as $airport) {
  /* On <td> You can use it to show Name, ICAO and anothers thing from PhpMyAdmin */
echo $airport->name;  
echo $airport->icao;   

}
?>

Yeah the dev put it the wrong spot to begin with

 

Link to comment
Share on other sites

  • Moderators
On 21/2/2017 at 5:11 PM, web541 said:

<?php
$airports = OperationsData::getAllAirports();
  /* Above <td> You have to put it */
foreach($airports as $airport) {
  /* On <td> You can use it to show Name, ICAO and anothers thing from PhpMyAdmin */
echo $airport->name;  
echo $airport->icao;   

}
?>

Yeah the dev put it the wrong spot to begin with

 

Now it works!! thanks you so much :D

Link to comment
Share on other sites

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...