Home >Backend Development >PHP Tutorial >Ajax post method example (with loop)_PHP tutorial
The purpose of using loops is to perform reasonable processing before data is sent, and to solve the timeout phenomenon that occurs when the script language performs additional processing on data. I don't have a deep understanding of ajax. If there is something wrong or not in place, please give me some advice.
The post method in ajax has three parameters. The first two parameters are required, and the third parameter depends on the requirements. The red part in the picture below is unnecessary if your own encoding is utf8. Because the default transmission value of ajax itself and itself are encoded in utf8, if you use gbk encoding, you need to transcode before the data is transmitted.
However, corresponding transcoding cooperation is also required in the server processing language, such as