I’m very new to php I have been watching some youtube videos I have a json file [{"name":"hally","ip":{"ip":[1,2,3,4]}},{"name":"Olojak","ip":{"ip":[11,22,33,44]}},{"name":"Andy","ip":{"ip":[111,222,333,444]}},{"name":"NoMad","ip":{"ip":[1111,2222,3333,4444]}},{"name":"ni","ip":{"ip":[11111,22222,33333,44444]}},{"name":"Nish","ip":{"ip":[111111,222222,333333,444444]}},{"name":"hs","ip":{"ip":[1111111,2222222,333333,4444444]}},{"name":"Kif","ip":{"ip":[11111111,22222222,33333333,44444444]}},{"name":"Kip","ip":{"ip":[111111111,111111111,111111111,11111111]}}] and i want to display each name and ip address this is my php file <?php $jsondata = file_get_contents("info.json"); $names = json_decode($jsondata, true); foreach ($names as $user){ echo $user[‘name’]."<br/>"; echo "IP:".$user[‘ip’]; echo "<br/>"; }; //echo "<br/>"; echo […]
- Tags .44, '111111111', '2222', '22222222'] }; }, '3333', "ip":{"ip":[1, "ip":{"ip":[11, "ip":{"ip":[111, "ip":{"ip":[1111, "ip":{"ip":[11111, "ip":{"ip":[111111, "ip":{"ip":[1111111, "ip":{"ip":[11111111, "ip":{"ip":[111111111, (444, {"name":"Andy", {"name":"hs", {"name":"Kif", {"name":"Kip", {"name":"ni", {"name":"Nish", {"name":"NoMad", {"name":"Olojak", 11111111]}}] and i want to display each name and ip address this is my php file <?php $jsondata = file_get_contents("info.json"); $names, 2, 22, 222]], 22222, 222222, 2222222, 3, 33, 333, 33333, 333333, 33333333, 4, 4444, 44444], 444444]}}, 4444444]}}, 44444444]}}, I'm very new to php I have been watching some youtube videos I have a json file [{"name":"hally", true); foreach ($names as $user){ echo $user['name'].""; echo "IP:".$user['ip']; echo ""; }; //echo ""; e