Menggunakan Anchor dengan image pada CodeIgnitier

HTML :

<a href=”http://urltujuan.html”><img src=”/images/image.gif” style=”border: 0px”></a>

CodeIgniter:

Load html helper untuk menggunakan fungsi img()
<?php $this->load->helper(‘html’);?>

Gunakan fungsi img()
<?php echo anchor(“http://urltujuan.html”, img(array(‘src’=>’../images/image.gif’,’style’=>’border:0px’))); ?>

Facebook Comments
Tagged with: , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.