karthikeyan_coder Posted July 2, 2006 Share Posted July 2, 2006 i need to delay a single line's execution. let us say...2: for($loop=1;$loop<=100;$loop++)3: {4: mail();5: }i need to delay execution of mail(); as 1sec.... this script must finish 100 emails after 100secs.... 1 sec delay for each mails.how its possible?? Quote Link to comment Share on other sites More sharing options...
mrwhale Posted July 2, 2006 Share Posted July 2, 2006 [code]<?phpfor( $loop=1; $loop <= 100; $loop++ ){ mail(); sleep( 1 ); // delays for 1 seconf ;)}?>[/code]have fun :) Quote Link to comment Share on other sites More sharing options...
karthikeyan_coder Posted July 2, 2006 Author Share Posted July 2, 2006 [quote author=mrwhale link=topic=99172.msg390436#msg390436 date=1151835948][code]<?phpfor( $loop=1; $loop <= 100; $loop++ ){ mail(); sleep( 1 ); // delays for 1 seconf ;)}?>[/code]have fun :)[/quote]Thanks working fine :) Quote Link to comment Share on other sites More sharing options...
mrwhale Posted July 2, 2006 Share Posted July 2, 2006 good one :) 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.