Jump to content

Archived

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

saco

using variables in h ref tag

Recommended Posts

Hi!

I am having problems inserting variables into h ref.

how do I do it?

Share this post


Link to post
Share on other sites
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/.htm

thanks very much! - sorry, disregard last post
Saco

Share this post


Link to post
Share on other sites
echo "<tr><td><a href=\"http://www.test.com/" . $item_name . ".html\">Download</a></td></tr>";

Share this post


Link to post
Share on other sites

×

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.