wrathican Posted June 29, 2007 Share Posted June 29, 2007 i want to make a counter that i can echo. its going to be used in a while loop so i want it to be increased by one everytime the loop runs so each time it runs it would look like this counter=1 counter=2 counter=3 etc.. any help? Quote Link to comment Share on other sites More sharing options...
Wildbug Posted June 29, 2007 Share Posted June 29, 2007 <?php $counter = 0; while (1) {echo $counter++;} ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.