Guest User

Untitled

a guest
Nov 17th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. <?php
  2.  
  3. // Replace the data compilation and output (ajax.php file) by this:
  4.  
  5. $images = array();
  6. foreach ($media->data as $data) {
  7. $images[] = array(
  8. 'id' => $data->id,
  9. 'url' => $data->images->thumbnail->url,
  10. 'user' => $data->user->username
  11. );
  12. }
  13.  
  14. echo json_encode(array(
  15. 'next_id' => $media->pagination->next_max_id,
  16. 'images' => $images
  17. ));
Add Comment
Please, Sign In to add comment