I have one div which contain UL and LI. In this I want to generate dynamic Id of that LI. right now I given static id of this .
Now In this I want to generate my li's ID like given below. Now I'm bit confused how will I get this.
<li id= "nav-fragment-1">
<li id= "nav-fragment-2">
<li id= "nav-fragment-3">
<li id= "nav-fragment-4">
<div id="featured">
<ul class="ui-tabs-nav">
<?php $i = 0; foreach($posts as $post): ?>
<li class="ui-tabs-nav-item ui-tabs-selected" id="nav-fragment-1">
<a href="<?php //echo $i++;) ?>"><span><?php echo $this->escape($post['title']) ?>
<?php if($leads): ?>
<p><?php echo $this->maxText($post['content'], 50, '...', true) ?></p>
<?php endif ?></span>
<img class="post-image" src="<?php echo $this->postImage($post['image'], '50px', '50px') ?>" alt="" title="<?php echo $this->escape($post['title']) ?>"/></a>
</li>
<?php endforeach ?>
</ul>
</div>