I am facing problem for incrementing href id.
for example href="#tab1", i want to increment n=6. It will increment like

<a href="#tab1" data-toggle="tab">Counselor 1</a>
<a href="#tab2" data-toggle="tab">Counselor 2</a>
<a href="#tab3" data-toggle="tab">Counselor 3</a>
<a href="#tab4" data-toggle="tab">Counselor 4</a>
<a href="#tab5" data-toggle="tab">Counselor 5</a>
<a href="#tab6" data-toggle="tab">Counselor 6</a>

any body help me to increment #tab1 to #tab6 inside <a> tag.

Recommended Answers

All 2 Replies

Use a loop and just add the digit on each time.

This is pretty basic stuff, may I ask if you are able to program at all in php?

Hi DaveAmour,

I am creating dynamically tabs with data using anchor. for me not working thats why asked. normally i am gud with for loop

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.