Royzzzz Posted December 11, 2016 Report Share Posted December 11, 2016 Hi, I wanna make an logbook for the profile page, but I get an error: Parse error: syntax error, unexpected '(' on line 225 This is the code : <?php $count = 6; $pireps = PIREPData::getRecentReportsByCount($userinfo->pilotid) ($count); <--LINE 225 ?> <?php if(count($pireps) > 0) { foreach ($pireps as $pirep) { $pilotinfo = PilotData::getPilotData($pirep->pilotid); $pilotid = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid); echo '<tr><td><div class="label label-sm label-primary"><i class="fa fa-plane"></i></div> '.$pirep->firstname.' '.$pilotinfo->lastname.' completed '.$pirep->code.$pirep->flightnum.' from '.$pirep->depicao.' to '.$pirep->arricao.' <br></td></tr>'; } } else { echo '<tr><td>There are no recent flights!</td></tr>'; } ?> Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Sava Posted December 13, 2016 Report Share Posted December 13, 2016 Well, as the error says, that "(" before $count is not expected. Not sure if other parts of your code are Ok, but if you just delete the ($count) part it will get rid of the error. Quote Link to comment Share on other sites More sharing options...
Royzzzz Posted December 13, 2016 Author Report Share Posted December 13, 2016 Well, Its a sort of working... I got only 1 Flight now instate of 4 (http://prntscr.com/ditm7v) The code now: (http://prntscr.com/ditmoi) Quote Link to comment Share on other sites More sharing options...
Members Vangelis Posted December 13, 2016 Members Report Share Posted December 13, 2016 You are using the wrong function that is why you should use $pireps =PIREPData::getLastReports($userinfo->pilotid,10) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.