Need help reagrding image as anchor |
[eluser]handoyo[/eluser]
Hi all,i try the following code Code: echo anchor('admin/conf/edit/'.$list['id'],'<img src="'.base_url().'/img/Edit.gif" width="32" height="32"/>',array('title' => '')); I got it from Image as anchor It doesn't show the images instead only grey colour.. error
[eluser]bigtony[/eluser]
Personally I use the CI img function so it works out he relative path itself: Code: echo anchor("controler/function/{$param}", img(array('src' => 'path/to/image.gif', 'alt' => "Some alt text")));
[eluser]handoyo[/eluser]
I've tried it bigtony.I use it like this Code: echo anchor("admin/conf/edit/".$list['id'],img(array('src' => 'img/Edit.gif', 'alt' => "Edit"))); It gives me error Code: Fatal error: Call to undefined function img() in D:\xampp\htdocs\7com\system\application\views\admin\store_config_home.php on line 34 Thanks..
[eluser]bigtony[/eluser]
You need to load the helper for it!!! Code: $this->load->helper('html');
[eluser]handoyo[/eluser]
Oops....I've setup in the autoload,it shows Edit with border only..Thanks.. |
Welcome Guest, Not a member yet? Register Sign In |