Moderators mark1million Posted October 9, 2011 Moderators Report Posted October 9, 2011 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. Quote
bunoire14 Posted October 9, 2011 Report Posted October 9, 2011 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, Quote
Moderators mark1million Posted October 10, 2011 Author Moderators Report Posted October 10, 2011 No that does not work, i couldn't tell you the error either as i have display turned of. Quote
Tom Posted October 10, 2011 Report Posted October 10, 2011 echo '<td align=center> <a href="'.SITE_URL.'/index.php/pireps/view/'.$pirep->pirepid.'" />'.$pirep->code.$pirep->flightnum.'</a> </td>'; Correct as far as I can tell from my phone... Quote
Moderators mark1million Posted October 10, 2011 Author Moderators Report Posted October 10, 2011 Thank you Tom, greatly appreciated, I have been working on this for ages, thing is when i left school there was no computers so learning php has been a bit difficult but with the help of some websites and the great community here I'm getting there. Quote
bunoire14 Posted October 10, 2011 Report Posted October 10, 2011 Nice spot Tom, Those pesky " always sneak through! Quote
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.