RE: [PHP] Count of elements in XML

2006-01-20 Thread Richard Correia
Hi Jay, Check the example at http://www.weberdev.com/Manuals/PHP/function.simplexml-element-children.html Thanks, Richard -Original Message- From: Jay Paulson [mailto:[EMAIL PROTECTED] Sent: Friday, January 20, 2006 11:06 PM To: PHP LIST Subject: [PHP] Count of elements in XML I was

[PHP] Count of elements in XML

2006-01-20 Thread Jay Paulson
I was wondering if there is a way to get the number of foo elements in my XML below? This way I could loop through each element and print out the attributes. $string = " 1 2 3 4 "; $xml = simplexml_load_string($string); // this doesn't return the correct number of elements but instead retu