Search code examples
phpjsonflickr

Json problem in flickr


I have this json but I have no idea how to get 7796249@N02

a:2:{s:4:"user";a:3:{s:2:"id";s:11:"7796249@N02";s:4:"nsid";s:11:"7796249@N02";s:8:"username";a:1:{s:8:"_content";s:9:"ilhan.z.y";}}s:4:"stat";s:2:"ok";}

Solution

  • That is a serialized PHP array, not JSON. Use:

    $array = unserialize('that response goes in here');