There are various options:
I understand they are all used to fetch data without refreshing the page, but I am confused about which would be better to work with PHP?
Underneath they are all the same technology. Those are just different interfaces to doing the same thing - making an asynchronous HTTP request to the server without refreshing the page.
PHP doesn't know - and doesn't care - which one you use to make your request. All it knows is that a request arrived. How it was generated is not something which matters to it.
That's the beauty of protocols such as HTTP - as long as both client and server understand the protocol, they don't need to care how each other is actually implemented.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With