How To Make Link On Image In CakePHP

Hi Friends, After long time I am writing post. In this article I will tell you how to make link on image via in cakePHP. Making Link in cakePHP is easy but sometime we have to make link on image so it is little bit tricky, I have tried so much and after trying so many times I found one way to make link on image.

Below are the syntax to make link on image.

echo $html->link($html->image("user_red_delete.png"), 'javascript:;', array('escape' => false));

In above statement you just have to replace your image path with RED words “user_red_delete.png”.

After doing this you will see that your image will have link on itself.

Subscribe to PHP Freelancer

Enter your email address: