My AJAX request runs a PHP script which calls several functions. Each function queries a different API, generates some HTML based on the results, and populates an array. At the end of the script, the values from the array are added to a database.
Since the functions can take a good chunk of time, I would like my AJAX to display the HTML as it is being generated, i.e. after each function is completed. At the same time, I would like to only have one AJAX request because I need to add all the values to my database at the end.
Hopefully this makes some sense – is what I'm trying to do even possible? Could anyone suggest a solution/workaround/anything to point me in the right direction? Thanks!