is there anyway to sleep or stall until a certain task is completed inside of a while loop?
I was thinking something like if (!$complete) { sleep(2); }
Isn't that unnecessary? If you are in a loop the next line won't try to execute until the current one is done.
well if you look in my ftp example that I posted in a few threads back it seems as if the process is running before the file is uploaded ftp. Because it will only upload one file when it is supposed to loop and do 12.
It's more likely that there's a problem with your code. Can you post the example here?