Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $urlwithjson = 'http://www.example.com/url-with-json-code-field1value-field2value-field3value';
- $downloadcontent = file_get_contents($urlwithjson);
- $json = json_decode($downloadcontent, true);
- foreach($json['jsonroot'] as $item) {
- print $item['one'];
- print $item['two'];
- print $item['three'];
- }
- ?>
- {"jsonroot": [
- {"one": "1", "two": "2", "three": "3"}
- ]}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement