Loop through SimpleXml object in php
Posted
by chirs
on Stack Overflow
See other posts from Stack Overflow
or by chirs
Published on 2010-06-09T18:32:23Z
Indexed on
2010/06/09
18:42 UTC
Read the original article
Hit count: 402
php
I have a simpleXml object and want to read the data from the object.I am new to php.The object details are as follows.I want to read name like general and name which is inside company array i.e Korey Kay & Partners.What is the syntax for it?
SimpleXMLElement Object ( [@attributes] => Array ( [type] => array ) [project] => Array ( [0] => SimpleXMLElement Object ( [created-on] => 2008-07-18 [id] => 2257372 [last-changed-on] => 2010-05-27T22:28:29Z [name] => *GENERAL [status] => active [company] => SimpleXMLElement Object ( [id] => 406952 [name] => Korey Kay & Partners ) )
© Stack Overflow or respective owner