sleep function

From: Date: Thu, 12 May 2005 19:39:47 +0000
Subject: sleep function
Groups: php.general 
Request: Send a blank email to php-general+get-215066@lists.php.net to get a copy of this message
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 !!!

« previous php.general (#215066) next »