i don't use echo, but i'm sure it's the same as print
if you want to link from one picture to another, then yes it's:
echo "<a href=\"\".jpg><img src=\"\".jpg></a>";
(don't forget to escape the '"' )
but, if you want to link a picture from text, then just replace the img src tag with the text.
hope this helps.