im having trouble decoding and adding this JSON data in PHP, each json contains 8 entries, after im hoping to have a site layout that 4x4 grid
JSON Structure
{
"packages": [
{
"id": "TEST2362",
"name": "TEST"
"desc": "TEST Desc",
"image": "URL",
"package": "URL",
"version": "1.00",
"picpath": "PATH",
"desc_1": "",
"desc_2": "",
"ReviewStars": "4/5 Stars",
"Size": "1.1 GBs",
"Author": "TESTER",
"apptype": "TEST TYPE",
"pv": "VER",
"main_icon_path": "URL",
"main_menu_pic": "PATH",
"releaseddate": "1/1/2019"
},
iv tried this
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
$json = file_get_contents("URL.com/test.json");
$data = json_decode($json, true);
$data->packages->id[0];
echo $data;
?>
i get
Notice: Trying to get property 'packages' of non-object in PATH on line 10
Notice: Trying to get property 'id' of non-object in PATH on line 10