Image as anchor in the encoder
how to make an image as an anchor in the encoder? I have tried the following code,
echo anchor ("admin / conf / edit /".$ list ['id'], img (array ('src' => '../img/edit.jpg', 'alt' =>" "))) ;
It gives me a gray square like in the "Actions" column
Thank...
+2
handoyo
source
to share
3 answers
Try the following:
anchor("admin/conf/edit/".$list['id'], img('src'=>'../img/edit.jpg','border'=>'0');
or
anchor("admin/conf/edit/".$list['id'], img('src'=>'../img/edit.jpg','style'=>'border:0px');
+2
Iraklis
source
to share
You have to load the html helper class first and then
$img = array('src' => '../img/edit.jpg','width'=>'25','height' =>"10");
echo anchor($path, img($img));
Must be good enough to work.
+1
Nidheesh
source
to share
This will work:
$path = 'admin/conf/edit/' .$list['id'];
$img = '<img src="../img/edit.jpg" alt="">';?>
echo anchor($path, $img);
And with the html helper:
$img = array(
'src' => '../img/edit.jpg',
'alt' => ''
);
$path = 'admin/conf/edit/' .$list['id'];
echo anchor($path, img($img));
0
Marko Milosevic
source
to share