Jump to content

Recommended Posts

Posted

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;   


?>
  • Like 1
  • Moderators
Posted
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

Posted
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;   

}
?>
  • Moderators
Posted
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

Posted

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;   

}
?>

 

  • Moderators
Posted
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

Posted
<?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

 

  • Moderators
Posted
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

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