Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- set_time_limit(0);
- $path = 'data/mapx.json';
- if (file_exists($path))
- {
- $items = json_decode(file_get_contents($path), true);
- echo "Trying to synchronize ".count($items)." items".PHP_EOL;
- foreach ($items as $item)
- {
- echo $item['id'].PHP_EOL;
- echo $item['key'].PHP_EOL;
- echo $item['mapData'].PHP_EOL;
- echo $item['height'].PHP_EOL;
- echo $item['width'].PHP_EOL;
- }
- //echo count($items)." items were synchronized".PHP_EOL;
- }
- else
- {
- exit("Unable to find JSON data files.".PHP_EOL);
- }
Add Comment
Please, Sign In to add comment