Re: sleep function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/12/05, virtualsoftware@xxxxxxxxx <virtualsoftware@xxxxxxxxx> wrote:
> Hi,
> 
> I want to create a script that displays all names from a database once per second.
> A part of the script look like this.
> 
> for ($i=0; $i<$total_names; $i++)
>     {
>       echo "name<br>";
>       sleep (1);
>     }
> 
> The scipt works fine but it displays all names at once. I want to display the first name, then refresh the browser and display the first name and the second, then the first name, the second and the third ....and so on.
> Can someone please tell me how can i do this?
> 
> Thanks in advance for your help !!!
> 
> 
You're gonna have to use output buffering... I have never used it so
I'm no expert, but I figured I could point you in the right direction.
http://ca3.php.net/outcontrol

-- 
jamwil.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux