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?? Link to comment https://forums.phpfreaks.com/topic/13442-delay-an-execution-of-single-line/ 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 :) Link to comment https://forums.phpfreaks.com/topic/13442-delay-an-execution-of-single-line/#findComment-51944 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 :) Link to comment https://forums.phpfreaks.com/topic/13442-delay-an-execution-of-single-line/#findComment-51948 Share on other sites More sharing options...
mrwhale Posted July 2, 2006 Share Posted July 2, 2006 good one :) Link to comment https://forums.phpfreaks.com/topic/13442-delay-an-execution-of-single-line/#findComment-51950 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.