RubyJunk
0
Q:

php decode json file

$json = json_decode(file_get_contents('/path/to/your/file.json'));
4
<?php

$json = '{"firstName":"Peter","lastName:":"Silva","age":23}';

$personInfo = json_decode(json);

echo $personInfo->age;

?>
0

  <?php
$jsonobj = '{"Peter":35,"Ben":37,"Joe":43}';

var_dump(json_decode($jsonobj));
?>
 
0

New to Communities?

Join the community