I have a while Loop that works something like this (I've simplified it so you can see the general logic of what I'm trying to accomplish):
$i = 1;
-- progress bar code here --
if ($i == 1)
Basically, I want to output a progress bar while I perform a task in the background. When the task is completed it writes a $completed_file txt file, so I know when to stop the progress bar.
The problem is that when it gets to the ProcessTask() function, it stops to run that WHOLE function. So basically it sits at 10% until the ProcessTask function is completed, and then it outputs everything to the page. Instead of that I want it to run the Function in the background, allowing my progress bar to run smoothly and completely.
Is there a way to run a task/function in the background of the while loop, so my progress bar doesn't get interrupted?
Your advice/experience is very much appreciated.