TheRodinhoods

How to hyperlink image in php

I have a a thumbnail image which I want to hyperlink in php I am not able to do it and have spend 3 hours breaking my head on it.

All I want is to use the value of hyperlink coming from permallink() as my hyperlink source

Guys experts please help

my piece of code is this