Guest User

Untitled

a guest
Oct 22nd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. <?php
  2.  
  3. set_time_limit(0);
  4.  
  5. $path = 'data/mapx.json';
  6.  
  7. if (file_exists($path))
  8. {
  9. $items = json_decode(file_get_contents($path), true);
  10.  
  11. echo "Trying to synchronize ".count($items)." items".PHP_EOL;
  12.  
  13. foreach ($items as $item)
  14. {
  15. echo $item['id'].PHP_EOL;
  16. echo $item['key'].PHP_EOL;
  17. echo $item['mapData'].PHP_EOL;
  18. echo $item['height'].PHP_EOL;
  19. echo $item['width'].PHP_EOL;
  20. }
  21.  
  22. //echo count($items)." items were synchronized".PHP_EOL;
  23. }
  24. else
  25. {
  26. exit("Unable to find JSON data files.".PHP_EOL);
  27. }
Add Comment
Please, Sign In to add comment