나는 freebase API를 사용하고 있습니다. 곱슬 곱셈 연산에서 결과를 얻으면 json을 PHP로 디코딩합니다. 이제 나는 귀속 된 텍스트에 액세스하려고합니다. 그 객체와 배열의 집합 안에 깊게 묻혀있다.다른 객체 그룹 내의 배열에 액세스하고 배열
stdClass Object ( [id] => /m/09c7w0 [property] => stdClass Object ( [/common/topic/description] => stdClass Object ( [valuetype] => string [values] => Array ( [0] => stdClass Object ( [text] => The United States of America, commonly called the United States and colloquially referred to as... [lang] => en [creator] => /user/wikirecon_bot [project] => wikirecon [dataset] => /m/0kj4zz_ [citation] => stdClass Object
이것은 내가 지금까지 시도했지만 나는 약간의 오차가 무엇입니까 것입니다. $ stuff = $ data-> property ->/common/topic/description-> text;
오류는 "/ common/topic/description"의 결과 일 수 있습니다. json을 PHP 객체에 응답해야합니까? 아니면 json에서 먼저 내 값을 찾으려 시도해야합니까? 내가 그 속성 "텍스트"하드
당신이 이해할 수 있도록 조금 더 자세하게 설명하겠습니다. –