开发者

How to echo Hyperlink Containing a Variable?

In the code below, I would like to make the word that prints out as the variable "$submittor" a hyperlink to "http://www...com/.../members/index.php?profile=$submittor" .

I can't get it to work; I think I'm doing the formatting wrong.

How can I do it?

Thanks in advance,

John

echo '<div class="sitename3name">Submitted b开发者_Python百科y '.$submittor.' on '.$dt->format('F j, Y &\nb\sp &\nb\sp g:i a').'</div>';


You've left out the link.

$link="<a href='http://www...com/.../members/index.php?profile=$submittor>$submittor</a>";
echo '<div class="sitename3name">Submitted by '.$link.' on '.$dt->format('F j, Y &\nb\sp &\nb\sp g:i a').'</div>'; 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜