Jump to content

How to list the aircraft pilot's panel?


levicosta201

Recommended Posts

  • Moderators

Bellow is your code with errors:

<?php
foreach($allaircraft as $aircraft)
{
if($aircraft->registration == $schedule->registration)//($schedule->registration) doesn't exist so this part wouldn't work.
$sel = 'selected';//This is totally useless in the code so you can remove it.
else //The same as above.
$sel = '';//The same as above.

echo ''.$aircraft->fullname.'';// when you want to echo the raw data from Data Base you don't need "." and "'", so remove them.
}
?>

So with corrections the code would be like this:

<?php
$allaircraft = OperationsData::getAllAircraft();//This would be the main feed of your code.
foreach($allaircraft as $aircraft)
{
echo $aircraft->fullname;
}
?>

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