Jump to content

Code help required please[SOLVED]


mark1million

Recommended Posts

  • Moderators

Hey,

I have been messing about for a while and cant get it to work, brain has totally fried now.

This is what i currently have which is not right but it does work,

echo "<td align=center> <a href=\"../index.php/pireps/view/$pirep->pirepid\"/> $pirep->code$pirep->flightnum </a> </td>";

So when i change it to the below the url works fine but i can seem to echo out the variable to display the EZY flight number all i get in the table is the code $pirep->code$pirep->flightnum.

echo '<td align=center> <a href='.SITE_URL.'/index.php/pireps/view/'.$pirep->pirepid.'/>$pirep->code$pirep->flightnum </a> </td>';

Help would be greatly appreciated from one of you experts :)

Cheers.

Link to comment
Share on other sites

Hi

The problem looks like your actually echoing method call as a string,

Try changing this:

echo '<td align=center> <a href='.SITE_URL.'/index.php/pireps/view/'.$pirep->pirepid.'/>$pirep->code$pirep->flightnum </a> </td>';

To This:

echo '<td align=center> <a href='.SITE_URL.'/index.php/pireps/view/'.$pirep->pirepid.'/>'.$pirep->code$pirep->flightnum.'</a> </td>';

Lemmie know if it works,

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