Quote:
But my big question for the example code you posted is why didn't you use a foreach loop?
I guess maybe you can't in your real code, I don't know. Just curious.
|
I just used 'key1', key2', etc. to simplify the example. What I'm actually doing is parsing an XML document into an associative array where the array keys, sometimes 10 or 15 levels deep (an array of arrays), correspond to the named XML tags. So there's no way to loop through it numerically.
But I've had it up and working for quite a while now, and some of the suggestions here helped a lot. Thanks to everyone!