Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我从 YouTube 获取 JSON 格式的数据,但它返回 JSON 为gdata.io.handleScriptLoaded({key:value});
gdata.io.handleScriptLoaded({key:value})
key由于响应不是 JSON 对象,我如何访问in php
key
我自己找到了答案。
我将值传递给请求 url script-in-json。simplay 将其更改为json
script-in-json
json
$json = gdata.io.handleScriptLoaded({key:value}); $res = json_decode($json); print $res->{'key'}; // it prints your value