SimpleXMLIterator::hasChildrenChecks whether the current element has sub elements. Beschreibung
public bool SimpleXMLIterator::hasChildren
( void
)
This method checks whether the current SimpleXMLIterator element has sub-elements. Parameter-ListeDiese Funktion hat keine Parameter. Rückgabewerte
Beispiele
Beispiel #1 Check whether the current element has sub-elements
<?phpDas oben gezeigte Beispiel erzeugt folgende Ausgabe:
object(SimpleXMLIterator)#2 (2) {
["title"]=>
string(10) "PHP Basics"
["author"]=>
string(9) "Jim Smith"
}
|