-1

stdclass で @ サインを使用してオブジェクトにアクセスする方法私は curl で php でこれを試しました: $response->HotelListResponse->customerSessionId (これは動作します) しかし、私がこのようなことをすると: $response->HotelListResponse->HotelList->@activePropertyCountエラーまたはヌル文字列を返す

stdClass Object

[HotelListResponse] => stdClass Object
    (
        [customerSessionId] => 0ABAA84E-3DC0-4913-E0C2-5C6541908000
        [numberOfRoomsRequested] => 1
        [moreResultsAvailable] => 1
        [cacheKey] => 6b03dc04:13e0c5c6541:-7ffd
        [cacheLocation] => 10.186.168.78:7302
        [cachedSupplierResponse] => stdClass Object
            (
                [@matchedLocale] => true
                [@matchedCurrency] => true
                [@tpidUsed] => 5001
                [@otherOverheadTime] => 2
                [@candidatePreptime] => 13
                [@supplierResponseTime] => 680
                [@supplierResponseNum] => 25
                [@supplierRequestNum] => 207
                [@cachedTime] => 0
                [@supplierCacheTolerance] => NOT_SUPPORTED
            )

        [HotelList] => stdClass Object
            (
                [@activePropertyCount] => 224
                [@size] => 25
                [HotelSummary] => Array
                    (
                        [0] => stdClass Object
                            (
                                [@ubsScore] => 6144465
                                [@order] => 0
4

1 に答える 1