foreach($data as $row){
$link_url = Uri::create('controller/method/:id', array('id'=>$row->id));
$thumb_url = Uri::create('path/to/images/:name', array('name'=>$row->image));
$img = Html::img($thumb_url, Str::truncate($row->desc,Config::get('thumbs.max_chars')));
echo Html::anchor($link_url,$img);}
instead how can i just do : show_thumbs($data) so i can handle repetitions and make script modification easier.
It looks like you're new here. If you want to get involved, click one of these buttons!