MrXander Posted August 17, 2007 Share Posted August 17, 2007 Hi there, Is there a way to slowly display data with PHP? Basically, what I want to show, is: "You spun the wheel." {Please Wait} Then two seconds later, display the result? Any tips are very much appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/65497-display-data/ Share on other sites More sharing options...
dbo Posted August 17, 2007 Share Posted August 17, 2007 http://us.php.net/sleep Quote Link to comment https://forums.phpfreaks.com/topic/65497-display-data/#findComment-327039 Share on other sites More sharing options...
wildteen88 Posted August 17, 2007 Share Posted August 17, 2007 http://us.php.net/sleep PHP wont be able to display data wait a bit and then display more. You'll probably want to use javascript. When you use sleep this just tells PHP to stop processing for X a mount of time. Quote Link to comment https://forums.phpfreaks.com/topic/65497-display-data/#findComment-327041 Share on other sites More sharing options...
dbo Posted August 17, 2007 Share Posted August 17, 2007 That's true. I'm going under the assumption that any processing they are doing is almost instantaneous so basically process.... wait 2 seconds.... process next record, etc. If the processing is something that needs to run in the background you'll have to come up with another alternative. Quote Link to comment https://forums.phpfreaks.com/topic/65497-display-data/#findComment-327042 Share on other sites More sharing options...
AndyB Posted August 17, 2007 Share Posted August 17, 2007 http://ca.php.net/manual/en/function.flush.php A combination of flush() and sleep() should do nicely. Quote Link to comment https://forums.phpfreaks.com/topic/65497-display-data/#findComment-327182 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.