Jump to content

Need help for increment numbers


ginocote

Recommended Posts

Hi, i use a java scrip to expand content from a rss feed.

 

It doesn't work because when all feed are showing, all javascrit have the same ID and each ID shoud be unique,

 

can i create with php or javascritp a new ID for each java script created in this php loop with my result?

 

Like increment by one for each result?

 

I can add php into result because it's not inside javascript.

 

like

maintab1

maintab2

maintab3

 

But each element are not in the same php bloc code.

 

Cheer

 

Thank's

Link to comment
https://forums.phpfreaks.com/topic/42902-need-help-for-increment-numbers/
Share on other sites

Hi, how can i integrate your script in that?

 

<div class="chunk" style="padding:0 5px;">

<ul id="maintab" class="shadetabs">

<li class="selected"><a href="#" rel="tcontent1">Description</a></li>

<li><a href="#" rel="tcontent2">Listen</a></li>

<li><a href="#" rel="tcontent3">Tab 3</a></li>

<li><a href="#" rel="tcontent4">Tab 4</a></li>

<li><a href="http://www.dynamicdrive.com">Dynamic Drive</a></li>

</ul>

 

So, the next one will be "maintab2" ect

 

Thank's

Hi, how can i integrate your script in that?

 

<div class="chunk" style="padding:0 5px;">
               <ul id="maintab" class="shadetabs">
<li class="selected"><a href="#" rel="tcontent1">Description[/url]</li>
<li><a href="#" rel="tcontent2">Listen[/url]</li>
<li><a href="#" rel="tcontent3">Tab 3[/url]</li>
<li><a href="#" rel="tcontent4">Tab 4[/url]</li>
<li>Dynamic Drive</li>
</ul>

 

So, the next one will be "maintab2" ect

 

Thank's

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.