html helper


First CI rock Smile

I use html helper and I would like to use img() but I want this img act like a link to point to my controller.

it's there a way doing this, I look at the user guide but don't find solution..

I know that I can use property but I don't get it to point to my function in my controller.


You can embed the img inside an anchor, like this...
<?php echo anchor('controller_name/function_name', img(array('src' => 'path/to/image_name.gif', 'alt' => "Calls a controller"))); ?>

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.