Jump to content


Photo

delay an execution of single line...


  • Please log in to reply
3 replies to this topic

#1 karthikeyan_coder

karthikeyan_coder
  • Members
  • PipPipPip
  • Advanced Member
  • 201 posts

Posted 02 July 2006 - 10:19 AM

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??



www.karthi.us

#2 mrwhale

mrwhale
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 02 July 2006 - 10:25 AM

<?php

for( $loop=1; $loop <= 100; $loop++ )
{
      mail();
      sleep( 1 ); // delays for 1 seconf ;)
}

?>

have fun :)

#3 karthikeyan_coder

karthikeyan_coder
  • Members
  • PipPipPip
  • Advanced Member
  • 201 posts

Posted 02 July 2006 - 10:42 AM

<?php

for( $loop=1; $loop <= 100; $loop++ )
{
      mail();
      sleep( 1 ); // delays for 1 seconf ;)
}

?>

have fun :)


Thanks working fine :)
www.karthi.us

#4 mrwhale

mrwhale
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 02 July 2006 - 10:43 AM

good one :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users