Hello, I have a multidimensional array object, and in a loop I would like to append an iterator to the key and obtain the value. Sample code for demonstration:
$array_object->example1 = 1;
$array_object->example2 = 2;
$i = 1;
while ($i <= 2) {
echo ($array_object->example . $i); //this does not work
//how to accomplish same?
$i++
}
Thank you in advance for any suggestions.