Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Oct 2004
    Posts
    104
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Pausing after echo

    Hey,
    Is there a way to echo some data and then pause and echo again? I know all about the sleep command, but that pauses it completely and echos nothing until the counter reaches 0.

    For example:
    "Hi"... pause 5 seconds
    "Welcome"... pause 2 seconds
    "thanks for visiting"

    Thanks
    Neo

  • #2
    Regular Coder Tyree's Avatar
    Join Date
    Sep 2003
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I COULD be wrong...but, being that PHP is a server-side language, I don't think this is possible. Javascript can do pauses though. Look into using that instead.

  • #3
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,044
    Thanks
    2
    Thanked 316 Times in 308 Posts
    Because of all the buffering, caching, and even compression that occurs between your web page and the browser, designing a web page that functions in this way is problematic at best and should not be relied upon.

    If you want content that is reveled a little at a time, either use javascript, make it an animated image, or use Flash.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #4
    Regular Coder
    Join Date
    Oct 2004
    Posts
    104
    Thanks
    7
    Thanked 2 Times in 2 Posts
    Ok, thanks guys


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •