Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

how to create a linked image?

images php coding issues or problems here.

Moderators: macek, egami, gesf

how to create a linked image?

Postby bltaug3 » Tue Oct 26, 2010 6:56 am

I'm working off previously created php coding, and am trying to figure out how to change a text link to an image. The code uses the link function, so I can't figure how what variable I can put in to get the image to show properly. The function of the button is a next/previous link for a catalog of products. Here's the current code:
Code: Select all
<?php echo $this->Html->link('<< Previous Product',array('controller'=>'products','action'=>'view', $product['Product']['id']-1)); ?>
<?php echo $this->Html->link('Next Product >>',array('controller'=>'products','action'=>'view', $product['Product']['id']+1)); ?>

I tried declaring a variable $prevbtn equal to <img src="http..."> and replacing the current '<< Previous Product' with that $prevbtn but that just displays the html src code.
New php-forum User
New php-forum User
Posts: 5
Joined: Fri Oct 22, 2010 1:11 pm

Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.