here is my code.. when i am using getData()
, it will give whole array..
$model = Mage::getModel('warranty/warranty');
$war = $model->getCollection()
->addFieldToSelect('*')
->addFieldToFilter('product_id', array('eq' => $productId))
->load();
echo'<pre>';print_r($war->getData()); die;
output:
Array
(
[0] => Array
(
[id] => 9
[product_id] => 554
[warranty_period] => 2 month
[price_in_warranty] => 500
[price_out_warranty] => 24
)
)
but when i try to get id using
echo $war->getId(); die;
nothing will display. how to get id through above array?