I got following JSON response from my api reply
{
"status": "success",
"mobile": "+14567878888",
"address": "usa"
}
I converted my JSON response to php Variable using
$content = file_get_contents($url);
$json = json_decode($content, true);
Now i want to use that php variable inside my requested page in jquery how to disply my variable inside Jquery ?
$(document).ready(function(){
// var number = <?php echo json['mobile']; ?>;
// alert(number);
// These codes do not work for me and
// How to display mobile number inside div writing code here and i want alert
});
<div id="display"></div>