Not that it matters but you don't need the "."(period).
I ran this with and without the period and it worked fine for me both ways.
<?php
$link = "http://www.yahoo.com";
echo"<a href='$link'>$link</a>";
?>
So it looks like it has something to do with how you assign a value to $link.