【发布时间】:2018-01-05 07:20:37
【问题描述】:
我从 WSDL 源获得此输出。 现在我想将所有部分保存在 PHP 变量中。 但是我怎么能分割这个大东西呢?前锋?任何想法? 我希望所有信息都包含在不同的变量中。
$response 中的所有数据..
$response = $client->getAllEventInfos('12345');
print_r($response);
这就是输出...
stdClass Object (
[beautifulDate] => 01.05.2018 20:00 - 21:00
[concernedPersons] => Array (
[0] => stdClass Object (
[item] => Array (
[0] => John Doe
[1] => Vortragender
[2] => ) ) )
[eventPool] => stdClass Object (
[id] => 1
[institutionName] => ASM Rechnungen
[name] => ASM )
[eventdates] => Array (
[0] => stdClass Object (
[item] => Array (
[0] => 01.05.2018 von 20:00 bis 21:00
[1] => Zwettl
[2] => 01.05.2018 20:00
[3] => 01.05.2018 21:00 ) ) )
[fullyBooked] =>
[id] => 10011
[name] => Besuch des Präsidenten
[registrationEndDate] => 25.12.2018
[registrationLink] => https:example.com
[registrationStartDate] => 01.01.2018
[startDate] => 01.05.2018
[wsEventDates] => Array (
[0] => stdClass Object (
[beginTime] => 01.05.2018 20:00
[endTime] => 01.05.2018 21:00
[periode] => 01.05.2018 von 20:00 bis 21:00
[venueName] => Zwettl ) )
[iCalLink] => https://example.com )
【问题讨论】:
-
为什么需要这样做?它现在已经可以访问,并且可以立即使用。例如 echo $response->beautifulDate;
-
还有关于“相关人员”的信息!例如,我怎样才能得到 john doe?