2

I am not being able to figure out how to get the first item in this type of collection: Varien_Data_Tree_Node_Collection

without knowing the key, is this possible?

2

Class Varien_Data_Tree_Node_Collection implements ArrayAccess. Try to use

 reset($varienCollection);  //to reset the internal array pointer
 $firstElement = current($varienCollection);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.