[Ajax/PHP] Cách để PHP trả Json Data về cho Ajax
Phần code php: Phần code ajax Demo https://makitweb.com/demos/return-json-response-ajax-using-jquery-php Conclusion In this tutorial, I showed how you can return the JSON response and handle it in jQuery AJAX. You can convert the PHP array in JSON format with json_encode() function and return as a response. Set dataType: ‘JSON’ when send AJAX request.