AJAX jQuery PHP Return Value

data.php

echo json_encode($myArray);

display.php

$.ajax({ url: ‘/my/site’,
data: {action: ‘test’},
dataType: ‘json’,
type: ‘post’,
success: function(output) {
alert(output);
}
});

http://stackoverflow.com/a/13366307

Published by

sornram9254

Ayutthaya Technical College/Voc.Cert.🛠️ | KMUTNB/B.S.Tech.Ed.⚙️ | Information Security Engineer 👨🏻‍💻| Penetration Tester👨🏻‍💻 | COYG🔴 Milan🔴⚫️ | Taylor Swift👩‍🎤 | ติ่งซีรีส์ญี่ปุ่น 🇯🇵

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.