I tried to boil the code down to support asking a general question. The reason I'm doing the while inside the function, is becuase thats where the data is being used, and calling the function and just passing those parameters doesn't work with my actual application which is calling the function with parameters which were omitted in this example/question. Suffice it to say, it makes the most sense for my application to pass the array as a parameter and deconstruct it in a while loop inside the function if that will work in php. I'm trying to minimize database queries and function calls, and while this does sound kinda kludgy, if the sytax allows, it works for my application.
|