CodeIgniter Forums

Full Version: Linking Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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.

El Forum

[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.

El Forum

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

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