CodeIgniter Forums
Linking Question - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Linking Question (/showthread.php?tid=43630)



Linking Question - El Forum - 07-19-2011

[eluser]JPrieto[/eluser]
Hi everyone!

I need to know how to code this in CI:
Code:
<a href='customer.php'><img src='cust.jpg'></a>

from what I understood in the user guide, it is:

Code:
echo link_tag('customer.php'); echo img('cust.jpg');

is this right?

what about the </a> at the end?

im so confused

please help
thanks

ps: the user guide does not mention what to do about the </a>, nor how to link using an image.


Linking Question - El Forum - 07-19-2011

[eluser]TheBaron[/eluser]
Erm. The link tag produces a 'link' tag.

Quote:Lets you create HTML &lt;link /&gt; tags. This is useful for stylesheet links, as well as other links.

It has nothing to do with anchor tags.


Linking Question - El Forum - 07-19-2011

[eluser]rogierb[/eluser]
it should be something like

Code:
echo anchor('test', img('images/test.gif'));