Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. <?php $url = 'https://t5een01pic.execute-api.ap-northeast-1.amazonaws.com/prod/coronavirus-data';
  2. $data = file_get_contents($url);
  3. $characters = json_decode($data, true);
  4. echo $characters[0]['country'];
  5.  
  6. foreach ($characters as $character) {
  7. echo $character['country'] . "\n";
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement