Answers for "HOW TO PUT JSON AS return type in php"

PHP
5

php return json

header('Content-type: application/json');
echo json_encode($array);
Posted by: Guest on March-20-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

Browse Popular Code Answers by Language