saco Posted October 13, 2006 Share Posted October 13, 2006 Hi!I am having problems inserting variables into h ref.how do I do it? Quote Link to comment Share on other sites More sharing options...
MrLarkins.com Posted October 13, 2006 Share Posted October 13, 2006 hmm, need more info, but i'll try a blind answer[code]echo ("<a href='$link'>$link</a>");[/code] Quote Link to comment Share on other sites More sharing options...
tleisher Posted October 13, 2006 Share Posted October 13, 2006 Or you could also do:echo "<a href='"" . $var . "\">Link</a>"; Quote Link to comment Share on other sites More sharing options...
saco Posted October 13, 2006 Author Share Posted October 13, 2006 Hi!,this is the problem I am having:echo("<tr><td><a href=http://www.test.com/$item_name.htm>Download</a></td></tr>");$item_name is the variable, and I need to put the file extension after the variable.the reply is http://www.test.com/.htmthanks very much! - sorry, disregard last postSaco Quote Link to comment Share on other sites More sharing options...
MrLarkins.com Posted October 13, 2006 Share Posted October 13, 2006 is the url a variable? or just the clickable text? Quote Link to comment Share on other sites More sharing options...
tleisher Posted October 13, 2006 Share Posted October 13, 2006 echo "<tr><td><a href=\"http://www.test.com/" . $item_name . ".html\">Download</a></td></tr>"; Quote Link to comment Share on other sites More sharing options...
MrLarkins.com Posted October 13, 2006 Share Posted October 13, 2006 ah, i see what he was trying to ask...good job tleisher! Quote Link to comment 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.