// Read JSON file $json_data = file_get_contents("data.json"); // Decode JSON data $data = json_decode($json_data, true); // Loop through each item in data foreach ($data as $item) { echo "Name: " . $item["name"] . " - Age: " . $item["age"] . "<br>"; }