Hi List,
I have a test function who's aim is to take an array an do something which
each value of the array and show the result on screen one at a time.
--- Test Function Code ---
function TestFunc(){
$cnt = array(1,2,3,4,5,6,7,8,9,10);
$i=0;
while($i <=count($cnt)){
set_time_limit(2);
echo $cnt[$i].str_repeat(" ", 300) . "<br />";;
ob_flush();
flush();
$i++;
}
--- End ---
This just shows the output after processing all of the function which is the
behaviour of php as a server side engine, but after reading the manual I
thought the combination of flush() and ob_flush() would do what I wanted,
but I obviously got the wrong end of the stick which flush() and what is
dose.
So I ask the list if there is a way to show success or fail results for each
of the values of an array one at a time:
I.e.:
1 = done
Wait 1 second
2 = done
Wait 1 second
And so on and so on. It will eventually show the progress of a dynamic MySql
query.
I know my func dose not contain any controls to test success or fail and the
func will be all success until I do but I can add that later when I have,
with your help, sorted out a way to do what I want.
I have no problem if this has to be a combo between js and php.
Thank you in advance for any help or examples with the issue.
Dave C
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 27/01/2004
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php