Jump to content

Array within an Array


kool_samule

Recommended Posts

Hi Chaps,

 

Hopefully an easy one for you, having a bit of trouble with an array within array.

 

I'm parsing an XML document, and attempting to assign variables as I go along. I'm hitting some trouble with one particular child node, as it's in an array.

 

PHP:

print_r($parent->child);

Array:

Array ( [0] => XMLTag Object ( [tagAttrs] => Array ( ) [tagName] => child [tagData] => Something in tagData [tagChildren] => Array ( ) [tagParents] => 3 ) ) 

 

Im basically after the value of child [tagData] , so I'll be able to assign a variable:

$childData = 'Something in tagData'

 

If anyone can help, it'll help me no end

 

Cheers

 

 

Link to comment
https://forums.phpfreaks.com/topic/261647-array-within-an-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.