woolade Posted April 22, 2009 Share Posted April 22, 2009 I'm trying to generate a hyperlink within a fetch_array based on a field value for each row. Currently I have; echo "<td align=\"center\"><a href='" . $seasname . "_results.php?seasid='>" . $row['Name'] . "</a></td>"; which returns : _results.php?seasid= I need to add a value next to the = sign by using : $row['Season_id'] so that the hyperlink returns : _results.php?seasid=1 or _results.php?seasid=2 etc depending on the season_id I've tried; echo "<td align=\"center\"><a href='" . $seasname . "_results.php?seasid=" . $row['Season_id']'>" . $row['Name'] . "</a></td>"; but that returns an error. I'm sure I'm just puttin " or ' in the wrong place, I've tried other scenarios but just can't seem to get it right, can someone please help. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/155154-solved-href-issue-within-fetch-array/ Share on other sites More sharing options...
avvllvva Posted April 22, 2009 Share Posted April 22, 2009 Try this.. echo "<td align='center'><a href='".$seasname."_results.php?seasid=".$row['Season_id']."'>".$row['Name']."</a></td>"; Quote Link to comment https://forums.phpfreaks.com/topic/155154-solved-href-issue-within-fetch-array/#findComment-816180 Share on other sites More sharing options...
woolade Posted April 22, 2009 Author Share Posted April 22, 2009 Magic! Thanks avvllvva. Quote Link to comment https://forums.phpfreaks.com/topic/155154-solved-href-issue-within-fetch-array/#findComment-816182 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.