Answers for "can i get a json from a specific php function?"

PHP
5

php return json

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

access json with php

<?php

$data = '{
	"name": "Aragorn",
	"race": "Human"
}';

$character = json_decode($data);
echo $character->name;
Posted by: Guest on August-20-2020

Code answers related to "can i get a json from a specific php function?"

Browse Popular Code Answers by Language