Home / PHP Tips Generated By ChatGPT / Reading JSON Data from a File in PHP Read and decode JSON data from a file into a PHP array. Source Code $jsonData = file_get_contents('data.json'); $data = json_decode($jsonData, true); print_r($data);