[eluser]keld[/eluser]
I thought I would just add my two cents to this thread about embedding images in anchor tags
Code:
//Link + no title + Image + no alt
<?php echo anchor("products/product/".$featured['nameuri'], img('images/featured/'.$featured['photo_featured'])); ?>
outputs:
Code:
<a href="http://www.mysite.com/products/product/productname"><img src="http://www.mysite.com/images/featured/feat_105x145.png" alt=""/></a>
and
Code:
//Link + title + image + no alt
<?php echo anchor("products/product/".$featured['nameuri'], img('images/featured/'.$featured['photo_featured']), 'title="'.$featured["name"].'"'); ?>
outputs:
Code:
<a href="http://www.mysite.com/products/product/productname" title="My Title"><img src="http://www.mysite.com/images/featured/feat_105x145.png" alt=""/></a>
and
Code:
//Link + title + image + alt
<?php echo anchor("products/product/".$featured['nameuri'], img(array('src'=>'images/featured/'.$featured['photo_featured'], 'alt'=>$featured["name"])), 'title="'.$featured["name"].'"'); ?>
outputs:
Code:
<a href="http://www.mysite.com/products/product/productname" title="My Title"><img src="http://www.mysite.com/images/featured/feat_105x145.png" alt="My Alt"/></a>