3
다음 XML 파일을 PHP simplexml에로드했습니다.동일한 태그를 사용하여 여러 항목을 반환하는 simplexml
$customers = new SimpleXMLElement($xmlstring);
이가 "밥"을 반환하지만 어떻게 내가 마지막으로 이름을 반환 할 사용
<adf>
<prospect>
<customer>
<name part="first">Bob</name>
<name part="last">Smith</name>
</customer>
</prospect>
</adf>
?
echo $customers->prospect[0]->customer->contact->name;
+1 멋진 수동 링크입니다. – hakre
고마워, 정확히 내가 무엇을 찾고 있었는지! – bmanhard