I currently have a simple html list. What I want is to repeat this list item with each repeated element having a variable that will increase by one, each time it is repeated.
The php calls that i have included in the above list item is from the Advanced Custom Field plugin on WordPress. The variable I want to change is the number inside of those php calls.
<ul> <li> <?php the_field('vendor_1_name'); ?> <!--the number is the variable that i want to increase by one with each repition--> <a href="http://<?php the_field('vendor_1_url'); ?>" target="_blank"/> <?php the_field('vendor_1_url'); ?> </a> </li> </ul>
I have an idea of how to do this using an array, but I would love to hear other methods on how to do something like this. Thanks!