"php returning json to jquery ajax call" Code Answer

2

You can return json in PHP this way:

header('Content-Type: application/json');
echo json_encode(array('foo' => 'bar'));
exit;
By nelliemarteen-c5556602b448 on October 17 2022

Answers related to “php returning json to jquery ajax call”

Only authorized users can answer the search term. Please sign in first, or register a free account.