Write a PHP script to delay the program execution for the given number of seconds





 Delay the program execution for the specified number of seconds

The sleep() function delays execution of the current script for a specified number of seconds.

<?php
echo date('h:i:s') . "<br>";

//sleep for 3 seconds
sleep(3);

//start again
echo date('h:i:s');
?>


Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post