Jump to content

Current Pilots Online Info


AFVA | Mitchell

Recommended Posts

  • 3 weeks later...

I get the word 'array'

How do i fix this?

Code:

			<?php echo $pilots = ACARSData::GetACARSData($cutofftime = '720'); ?>
      <td>
		<?php echo $pilots->pilotname; ?>
		</td>
		<td>
      <?php echo $pilots->flightnum; ?>
		</td>
      <td>
      <?php echo $pilots->depicao; ?>
      </td>
      <td>
      <?php echo $pilots->arricao; ?>
      </td>
      <td>
      <?php echo $pilots->phasedetail; ?>
      </td>
      </tbody>

Link to comment
Share on other sites

  • Administrators

You need to extract your data from the array with a foreach command. How about something like this...

<table>
  <?php 
$data = (ACARSData::GetACARSData($cutofftime = '720'));
    foreach ($data as $pilots)
      { ?>
       <tr>
              <td>
                   <?php echo "$pilots->firstname $pilots->lastname"; ?>
             </td>
             <td>
                   <?php echo $pilots->flightnum; ?>
            </td>
             <td>
                    <?php echo $pilots->depicao; ?>
            </td>
             <td>
                    <?php echo $pilots->arricao; ?>
            </td>
             <td>
                    <?php echo $pilots->phasedetail; ?>
            </td>
          </tr>
     <?php   } ?>
</table>

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