Answers for "get data from json file php"

PHP
3

read json file data using php

$filedata = file_get_contents('filename.json');
$details = json_decode($filedata);
print_r($details);
Posted by: Guest on July-19-2021
7

php decode json file

$json = json_decode(file_get_contents('/path/to/your/file.json'));
Posted by: Guest on March-15-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 "get data from json file php"

Browse Popular Code Answers by Language