You have exit() in your while loop. So the while loop will go through once, then exit. It will never go through a second time.
But removing the exit() isn't going to help. The browser is only going to want to download one file. If your script is called something.php, the browser, in a way, thinks it's downloading something.php. Your script is generating content, but the browser doesn't know that; it's just downloading a URL. Since it's only downloading from one URL, it's only expecting to receive one file. It's just the way HTTP was designed.
There's a couple of things you might be able to do...
You might be able to work around the one-file limitation by using frames and javascript. Have javascript in one frame direct the browser to load a file in another frame. Then have that javascript tell it to load the next file, then the next file, etc. I have no idea if this would actually work though.
If I were implementing a multiple-file-download function, I'd put all the files into a .zip file. Then the user can just download a single .zip file, and unpack it on their own machine. That's probably the simplest and most reliable way to do it.