PHP 8.5.0 Alpha 4 available for testing

Voting

: min(zero, five)?
(Example: nine)

The Note You're Voting On

james dot j dot hackett at gmail dot com
17 years ago
In Response to 'kassah at gmail'

You don't need to convert a DOMNodeList to an array in order iterate through it using 'foreach'. You can use foreach directly with the DOMNodeList.

$nodeList = $someDomDocument->getElementsbytagname('user');

foreach ($nodeList as $node) {
echo $node->nodeValue;
}

<< Back to user notes page

To Top