I am developing a simple PHP SOAP server that receives a request like the following:\[code\]<SOAP-ENV:Body> <myFunction> <arg1>arg1_value</arg1> <arg2> <id>3027</id> <id>1043</id> <id>827</id> </arg2> </myFunction> </SOAP-ENV:Body>\[/code\]The first argument (arg1) is mandatory and the second one (arg2) is optional and consists of zero, one or more elements 'id' as shown.I can access the arg1 value this way:\[code\]public function myFunction($args){ $value = http://stackoverflow.com/questions/15530167/$args->arg1;}\[/code\]What is the best way in PHP to get all the different 'id' arguments within the element arg2?EDIT:In my WSDL file I have something like this:\[code\] <xsd:element name="myFunction"> <xsd:complexType> <xsd:sequence> <xsd:element name="arg1" minOccurs="1" maxOccurs="1" type="xsd:string"></xsd:element> <xsd:element name="arg2" type="tns:multiple_ids" minOccurs="0" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:complexType name="multiple_ids"> <xsd:sequence> <xsd:element name="id" type="xsd:string" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType>\[/code\]