Welcome Guest, Not a member yet? Register   Sign In
Links and IDs
#1

[eluser]csabessz47[/eluser]
Hy all!

I'm fairly newbie to Codeigniter but I like it already.

I would like to create links (yes I used anchor() already), but I need something like this:

Code:
<a href="..." id="XX">YYY</a>

So I've trouble with the id parameter. How could I create it?

My code now:
Code:
&lt;?php foreach($menu as $key=>$item): ?&gt;
  <li>&lt;?=anchor($link[$key],$item); ?&gt;</li>
&lt;?php endforeach; ?&gt;

I have 2 arrays:
Code:
$data["menu"] = array("Main","About me","References","Services","Contact");
$data["link"] = array("","cv","refer","service","contact");

And I managed to create this:
Code:
<li><a href="http://localhost/cs/index.php/cv">About me</a></li>

But I need for example: id="cv"

How can I create it?


Messages In This Thread
Links and IDs - by El Forum - 09-11-2010, 11:12 AM
Links and IDs - by El Forum - 09-11-2010, 11:30 AM
Links and IDs - by El Forum - 09-11-2010, 11:36 AM
Links and IDs - by El Forum - 09-11-2010, 11:50 AM
Links and IDs - by El Forum - 09-11-2010, 12:02 PM
Links and IDs - by El Forum - 09-11-2010, 12:21 PM
Links and IDs - by El Forum - 09-14-2010, 02:12 PM
Links and IDs - by El Forum - 09-15-2010, 02:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB