가능한 중복 : 나는이추출 값
같은 PHP 배열을 얻고 서버에서 응답 데이터를 얻기 위해 SOAP을 사용하고
Able to see a variable in print_r()'s output, but not sure how to access it in code
Array
(
[BookResult] => stdClass Object
(
[PNR] => 5WPODU
[BookingId] => 31149
[Status] => stdClass Object
(
[StatusCode] => 03
[Description] => Fare is not available at the time of booking
[Category] => BK
)
[SSRDenied] => N
[ProdType] => Flight
)
)
내가 알고 싶은 건 어떻게 "PNR"과 "StatusCode"값을 별도의 변수에서 추출하여 th 데이터베이스에.
는$p = (object) $array;
echo $p->StatusCode;
시도'$ 배열 [ "BookResult"] -> PNR에 대한 PNR과 StatusCode에 대한 $ array [ "BookResult"] -> Status-> StatusCode' –
uson 또는 xml로 가져와야합니다 –