Read JSON from file in PHP

$file = new File('/path/to/file');
$myjson = $file->read(true, 'r');
$myjsonarray = json_decode($json);

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.