1 && $argv[1]=='md') { $mdfile = "Image Credits\n=============\nAll images are licensed CC BY 2.0\nfile - name - source"; $json = json_decode($images); foreach ($json as $img) { $mdfile .= "\n- ".$img->src." - ".$img->name." - ".$img->url; } file_put_contents('images.md',$mdfile); echo 'images.md created'; } } ?>