I have a collection that has one row of data in it. If I do following,
$collection->getData();
it give me an array like below,
array(1) {
[0] => array(3) {
["id"] => string(1) "1"
["field1"] => string(10) "Field 1 Data"
["field2"] => string(10) "Field 2 Data"
}
}
But when I do $collection->getField1()
it says Undefined Method. As far as I know php magic getter should work like this. Isnt it?
Any Ideas how to get this value without a foreach construct.