Write a foreach loop for this array.

Posted by mjames on Stack Overflow See other posts from Stack Overflow or by mjames
Published on 2010-04-17T20:35:31Z Indexed on 2010/04/17 20:43 UTC
Read the original article Hit count: 134

Hi, I am using the xpath in php5 to parse a xml document. The problem I have is writing a foreach to correctly display the following array

array(1) {
[0]=>
object(SimpleXMLElement)#21 (2) {
["file"]=>
string(12) "value 1"
["folder"]=>
string(8) "value 2"
}
}

Ideally i would like to get the value by using $row['file'] or $row['folder']. Thanks for any help.

© Stack Overflow or respective owner

Related posts about php5

Related posts about multidimensional-array