interesting problem of trying to get string within hyperlink
Posted: Thu Mar 13, 2003 1:15 pm
Hi all,
i am trying to print out a table from a database table and trying to make one of the fields a link to another webpage.
What i am trying to do is to make the last data in the row a link:
print "\t<td><font face=verdana size=2/><a href='http://www.cs.nott.ac.uk/Modules/0203/$var.html'>Full spec</a></font></td>\n";
The problem is i would like to enter a string variable as part of the hyperlink address. So in the example above i want to get $var to be recognised as part of the address. I have tried to concatentate like
print "\t<td><font face=verdana size=2/><a href='http://www.cs.nott.ac.uk/Modules/0203/' <? echo $var;?>.html'>Full spec</a></font></td>\n";
But i get a problem with the "" as it doesnt recognise the embedded PHP tags as it is already within PHP tags.
Can anyone help?????
Thank you for ur time.
Jos
i am trying to print out a table from a database table and trying to make one of the fields a link to another webpage.
What i am trying to do is to make the last data in the row a link:
print "\t<td><font face=verdana size=2/><a href='http://www.cs.nott.ac.uk/Modules/0203/$var.html'>Full spec</a></font></td>\n";
The problem is i would like to enter a string variable as part of the hyperlink address. So in the example above i want to get $var to be recognised as part of the address. I have tried to concatentate like
print "\t<td><font face=verdana size=2/><a href='http://www.cs.nott.ac.uk/Modules/0203/' <? echo $var;?>.html'>Full spec</a></font></td>\n";
But i get a problem with the "" as it doesnt recognise the embedded PHP tags as it is already within PHP tags.
Can anyone help?????
Thank you for ur time.
Jos