Answer the question
In order to leave comments, you need to log in
How to respond to ajax request in php during a loop?
Please tell me how to implement the task:
There is an ajax request from the front to the back. I send the parameters to php, and he, in turn, makes the necessary calculations in a cycle.
Previously, when I needed to get one response, I wrote a variable with the value of the completed result to die () and ajax in success received this response and worked further with it in the front.
I need that during the execution of a loop in Php, after each iteration, ajax receives the response of performing calculations in the iteration and sends the result sequentially to success. What to use instead of die()?
This is necessary to display the progress of the process.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question