Answers for "php get data from json response"

PHP
5

php return json

header('Content-type: application/json');
echo json_encode($array);
Posted by: Guest on March-20-2020
-1

how to make a json request in php

<?php
$jsonurl = "http://api.wipmania.com/json";
$json = file_get_contents($jsonurl);
var_dump(json_decode($json));
?>
Posted by: Guest on April-26-2020
1

return json in php

//code igniter
$query="qry";
$query = $this->db->query($query);
$res=$query->result();
return json_encode($res);
Posted by: Guest on September-24-2020

Code answers related to "php get data from json response"

Browse Popular Code Answers by Language