-6
    [{"data":{"attr":{"href":"http://www.google.com/","title":"http://www.google.com/"},"title":"Google"},"attr":{},"metadata":{}},
    {"data":{"attr":{"href":"http://www.yandex.com/","title":"http://www.yandex.com/"},"title":"Яндекс"},"attr":{"class":""},"metadata":{}}]

Help get the links from Json. Get the links of a given form of Json

<a href="http://www.google.com/" title="http://www.google.com/">Google</a>
<a href="http://www.yandex.com/" title="http://www.yandex.com/">Яндекс</a>
4

2 に答える 2

1

Since this seemed to be the correct answer, and I've just set a bounty I could do with the rep of an accepted answer:

either google, or RTM -> $parsed[0]['data']['attr']['href']

于 2012-08-16T13:42:27.040 に答える
0

I think you're asking to get the links from the json in PHP:

$links = json_decode($putYourJSONinsideThisVariable, true);

echo $links[0]['data']['attr']['href'];
于 2012-08-16T13:34:52.283 に答える