There is a string

= { "response": [64, { "pid": "114272714", "aid": "33565378", "owner_id": "5005272", "created": "1214309659", "src": "http:\/\/ cs1437.vkontakte.ru \/u5005272\/33565378\/m_2a07b7cb.jpg", "src_big": "http:\/\/ cs1437.vkontakte.ru \/u5005272\/33565378\/x_5769a2b7.jpg", "src_small": "http:\/\/ cs1437.vkontakte.ru \/u5005272\/33565378\/s_beb1d458.jpg", "text": "test" }] } 

You need to parse it, the whole problem is this: {"response":[64,{"pid ! How can I parse with php?

  • And if you try on JS? - atnartur

1 answer 1

Um .. json_decode() ?

 object(stdClass)#1 (1) { ["response"]=> array(2) { [0]=> int(64) [1]=> object(stdClass)#2 (8) { ["pid"]=> string(9) "114272714" ["aid"]=> string(8) "33565378" ["owner_id"]=> string(7) "5005272" ["created"]=> string(10) "1214309659" ["src"]=> string(59) "http://cs1437.vkontakte.ru/u5005272/33565378/m_2a07b7cb.jpg" ["src_big"]=> string(59) "http://cs1437.vkontakte.ru/u5005272/33565378/x_5769a2b7.jpg" ["src_small"]=> string(59) "http://cs1437.vkontakte.ru/u5005272/33565378/s_beb1d458.jpg" ["text"]=> string(4) "test" } } } 
  • four
    My finest hour :) - xEdelweiss