Combine anchor and img in CodeIgniter

CodeIgniter has a number of cool URL helper functions, two of them are anchor and img which generate the anchor and img HTML tags for you.

What’s even better though is you can combine these like so:

echo anchor('http://www.praj.com.au', img('http://content.praj.com.au/blog/favicon.gif'));

Which produces the combined image with a link anchor around it.