Creating image links in CakePHP

<?php echo $html->link($html->image(“back.png”,array(‘border’ => ‘none’)), $refLink, array(‘escape’ => false));?>

As you can see, from a PHP point of view it is as simple as including a function within another function.
So here, the image ‘back.png’ links to the path inside the $refLink variable.
You may also noticed we have added escape = false. If you do not specify this as false,
or you specify it as true then the raw html for the image will be out printed to the view as the link instead of the actual image.

Put array(‘border’ => ‘none’) to hide the border

Got this tutorial from Here
Check this page also


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: