XML HTTP Request (XHR) Object represents a pivotal API in the world of web development. It enables web applications to fetch data from a server asynchronously. Simply put, it allows for real-time updates without needing a page refresh.
<?php
header("Content-Type: application/json");
$userData = array(
"name" => "John Doe",
"email" => "john.doe@example.com"
);
echo json_encode($userData);
?>
<?php
header("Content-Type: application/json");
$userData = array(
"name" => "John Doe",
"email" => "john.doe@example.com"
);
echo json_encode($userData);
?>





No comments yet. Be the first to comment!