0

みんな助けてください...私はこれに苦労しています..

問題これから値 を取得する方法FirstName... PHPで

GetReportResponse Object
(
[GetReportResult] => MBPeopleSearchRs_Type Object
    (
        [MsgRsHdr] => MsgRsHdr_Type Object
            (
                [RqUID] => {29B1A627-D908-4A57-BC17-8E2592DC154A}
                [Status] => Status_Type Object
                    (
                        [StatusCode] => 0
                        [ServerStatusCode] => 
                        [Severity] => Info
                        [StatusDesc] => OK
                        [AdditionalStatus] => 
                    )

            )

        [Subject] => Subject Object
            (
                [RefNum] => 
                [PersonInfo] => PersonInfo_Type Object
                    (
                        [PersonName] => PersonName_Type Object
                            (
                                [LastName] => JANARDHANAN
                                [FirstName] => SENTHINBABU
                                [FullName] => 
                                [MiddleName] => 
                                [TitlePrefix] => 
                                [NameSuffix] =>  
                                [Nickname] => 
                                [LegalName] => 
                                [MaidenName] => 
                                [OfficialTitle] => 
                                [Source] => MB
                                [EffDt] => 2013-05-24
                            )
4

2 に答える 2

0

あなたはこれを試すことができます:

$xml = simplexml_load_string($response);
foreach ($xml->xpath('//GetReportResult//Subject//PersonInfo//PersonName//FirstName') as $item)
{
    var_dump($item);

}

ここで、$response は、wsdl 内の関数への呼び出しです。

于 2013-05-25T09:47:50.240 に答える