Welcome Guest, Not a member yet? Register   Sign In
Several html elements inside an anchor tag, with CI's anchor funtion
#5

[eluser]LuckyFella73[/eluser]
By passing an associative array you can add attributes to
the link tag - for example:
Code:
<?php
$array = array('class'=>'test');
echo anchor("home", "Link", $array);
// would produce:
<a class="test" href="http://localhost/your_app/home">Link</a>
?&gt;
This way you can set a css class (to set a background image for example)

See: http://ellislab.com/codeigniter/user-gui...elper.html


Messages In This Thread
Several html elements inside an anchor tag, with CI's anchor funtion - by El Forum - 12-01-2010, 10:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB