Understood what you are trying to do. Basically, getlatreports with 5 counts will return 5 row. Hence, you need to foreach loop. So here is the code i have provided for you. Once you get the idea of it, you can integrate it with your table or display it hwoever you like.
Code
<?php
//echo json_encode(PIREPData::getLastReports($pilot->pilotid, 1, PIREP_ACCEPTED)); // This is to get the parameters of the results like pirepid, flighttime etc. Mark out to not use it.
$getpireps = PIREPData::getLastReports($pilot->pilotid, 5, PIREP_ACCEPTED); // $getpireps will contain the counted pireps
foreach($getpireps as $pirep)
{
echo $pirep->pirepid; // Display results based on attribute.
echo $pirep->flighttime;
echo $pirep->depicao;
// and it goes on
}
?>
LEt me know if this works for you.