I am listing out posts in div's and want each div to have a different id. So the first post would be <div id="post-1">The first post</div>, the second <div id="post-2">The second post</div>, etc. How would I do this?
I am listing out posts in div's and want each div to have a different id. So the first post would be <div id="post-1">The first post</div>, the second <div id="post-2">The second post</div>, etc. How would I do this?
I figured out a way. I declared a variable and set it equal to 1, then at the end of each loop, I just added one to it.
This topic has been closed to new replies.