[eluser]CodeIgniterNewbie[/eluser]
usmc:
1. Your first approach declares a new variable, $you_are_killing_me_smalls. I am trying to avoid declaring a new variable. Instead, I want to access the individual elements of a method that returns an array directly.
2. I'm not too sure what your second approach does. It seems that $this->arrayContainer will always contain an empty array. Also, the call $MyObject->arrayContainer[1]; breaks encapsulation.
wiredesignz:
1. Changing the method signature is not an option.
Isn't there a way to access element values directly from a method that returns an array? It's possible to apply other array functions to such a result (e.g. count($MyObject->GetMyArray()), etc.). So, why not a way to access particular elements?