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? Link to comment https://forums.phpfreaks.com/topic/57741-solved-i-need-a-counter/ Share on other sites More sharing options...
Wildbug Posted June 29, 2007 Share Posted June 29, 2007 <?php $counter = 0; while (1) {echo $counter++;} ?> Link to comment https://forums.phpfreaks.com/topic/57741-solved-i-need-a-counter/#findComment-285898 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.