Пример 1:
$string = stdClass Object ( [product_id] => 25 ) $result= $string->product_id
$ result получит 25
Пример 2:
$string = Array ( [30] => stdClass Object ( [product_id] => 44 )) $result= $string[30]->product_id
$ result получит 44
Как насчет этого? Я хочу получить имя.
$string = [addresses] => Array ( [shipping] => AddressesAddress Object ( [addressBook:AddressesAddress:private] => AddressesAddressBook Object ( [performanceHint:AddressesAddressBook:private] => 1 [uid:AddressesAddressBook:private] => 1 [addresses:AddressesAddressBook:private] => Array ( [-1] => AddressesAddress Object *RECURSION* [-8] => AddressesAddress Object ( [addressBook:AddressesAddress:private] => AddressesAddressBook Object *RECURSION* [schemaAddress:AddressesSchemaAddress:private] => stdClass Object ( [first_name] => Sir))))
Я знаю только это:
$result= $string["shipping"]
и результат
AddressesAddress Object ( [addressBook:AddressesAddress:private] => AddressesAddressBook Object ( [performanceHint:AddressesAddressBook:private] => 1 [uid:AddressesAddressBook:private] => 1 [addresses:AddressesAddressBook:private] => Array ( [-1] => AddressesAddress Object *RECURSION* [-8] => AddressesAddress Object ( [addressBook:AddressesAddress:private] => AddressesAddressBook Object *RECURSION* [schemaAddress:AddressesSchemaAddress:private] => stdClass Object ( [first_name] => Sir))))
Мне нужна помощь.