BRADERY Posted October 7, 2010 Share Posted October 7, 2010 Well I usually run my scripts in CLI.. I have it do something then sleep for x amounr of settings, is there anyway to make it show me the seconds counting down instead of just a blinkin cursor? Link to comment https://forums.phpfreaks.com/topic/215327-php-live-countdown-in-cli/ Share on other sites More sharing options...
kenrbnsn Posted October 7, 2010 Share Posted October 7, 2010 You would have to use a loop, something like this: <?phpfunction mysleep($secs) { while ($secs > 0) { sleep(1); echo $secs . ' . '; --$secs; }}mysleep(10);?> Ken Link to comment https://forums.phpfreaks.com/topic/215327-php-live-countdown-in-cli/#findComment-1119751 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.