The
SimpleXMLIterator::next() function is an inbuilt function in PHP which is used to move the SimpleXMLIterator element to the next element.
Syntax:
void SimpleXMLIterator::next( void )
Parameters: This function does not accept any parameters.
Return Value: This function does not return any value.
Below program illustrates the SimpleXMLIterator::next() function in PHP:
Program:
Output:
object(SimpleXMLIterator)#2 (2) {
["email"]=>
string(21) "abc@geeksforgeeks.org"
["mobile"]=>
string(13) "+91-987654321"
}
Reference: https://www.php.net/manual/en/simplexmlelement.next