PHP count() Function
PHP SimpleXML Reference Manual
Example
Count the child nodes of the car node:
", $car['name'], $car->count()); } ?>
Run Example »
Definition and Usage
The count() function counts the number of child nodes of a specified node.
Syntax
count();
Technical Details
| Return Value: | Returns the number of child nodes of an element. |
|---|---|
| PHP Version: | 5.3+ |
PHP SimpleXML Reference Manual