Simple PHP increment function

Whenever I have to output a numbered list of data I usually run the following code to achieve the required result. $counter = 0; // for loop that does all the required code $counter++; // end for but I have discovered a lovely little function that does all this for...