Jump to content

[SOLVED] href issue within fetch array


woolade

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/155154-solved-href-issue-within-fetch-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.