TutorMe Posted July 13, 2007 Share Posted July 13, 2007 I know how to loop an event a certain number of times, but I cannot figure out how to make the number of times an option. Basically I want to have the form with an option to select the number of times the event happens. Below is the code I have now. It just loops repeatedly until I close the web page. <?php for ($i=1; $_REQUEST['times']; $i++) {my code here} Quote Link to comment Share on other sites More sharing options...
jchemie Posted July 13, 2007 Share Posted July 13, 2007 I know how to loop an event a certain number of times, but I cannot figure out how to make the number of times an option. Basically I want to have the form with an option to select the number of times the event happens. Below is the code I have now. It just loops repeatedly until I close the web page. <?php for ($i=1; $_REQUEST['times']; $i++) {my code here} The only change seems to be here <?php for ($i=1; $i <= $_REQUEST['times']; $i++) {my code here} Quote Link to comment Share on other sites More sharing options...
TutorMe Posted July 13, 2007 Author Share Posted July 13, 2007 Thanks for the quick response. That fixed it. 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.