fork(1) download
  1. <?php
  2.  
  3. $json = '[
  4. {
  5. "thumbnail_url": "http://___________/events/000000000028437f/169a7507-52f7-4148-8d27-66f158d43bf8_4140.jpg",
  6. "thumbnail_url_small": "http://___________/events/000000000028437f/169a7507-52f7-4148-8d27-66f158d43bf8_4140_150x84.jpg",
  7. "progressive_url": "http://____________/events/000000000028437f/169a7507-52f7-4148-8d27-66f158d43bf8_756.mp4?__gda__=1388134903_f3d8589a159ab4edbf36d379f926b7ca"
  8. },
  9. {
  10. "type": "video",
  11. "data": {
  12. "id": 38105981,
  13. "event_id": 2638719,
  14. "caption": "English - 18 Great Stages of the Path (Lam Rim) Commentaries - Session 3"
  15. }
  16. }
  17. ]';
  18. $obj = json_decode($json);
  19. //print_r($obj);
  20.  
  21. $thumbnail_url = $obj[0]->thumbnail_url;
  22. $progressive_url = $obj[0]->progressive_url;
  23. $caption = $obj[1]->data->caption;
  24.  
  25. print_r(array($thumbnail_url, $progressive_url, $caption));
  26.  
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
Array
(
    [0] => http://___________/events/000000000028437f/169a7507-52f7-4148-8d27-66f158d43bf8_4140.jpg
    [1] => http://____________/events/000000000028437f/169a7507-52f7-4148-8d27-66f158d43bf8_756.mp4?__gda__=1388134903_f3d8589a159ab4edbf36d379f926b7ca
    [2] => English - 18 Great Stages of the Path (Lam Rim) Commentaries - Session 3
)