I have a big array that I want to save in database.
My code line $model = Mage::getModel('thorleif/category')->setData($arr);
return the following result
object(Ns_Thorleif_Model_Category)#298 (15) { ["_eventPrefix":protected]=> string(13) "core_abstract" ["_eventObject":protected]=> string(6) "object" ["_resourceName":protected]=> string(17) "thorleif/category" ["_resource":protected]=> NULL ["_resourceCollectionName":protected]=> string(28) "thorleif/category_collection" ["_cacheTag":protected]=> bool(false) ["_dataSaveAllowed":protected]=> bool(true) ["_isObjectNew":protected]=> NULL ["_data":protected]=> array(5065) { [0]=> array(3) { ["id_linio_category"]=> int(18784) ["name"]=> string(8) "Mascotas" ["level"]=> int(0) } [1]=> array(3) { ["id_linio_category"]=> int(18893) ["name"]=> string(6) "Perros" ["level"]=> int(1) } [2]=> array(3) { ["id_linio_category"]=> int(18973) ["name"]=> string(27) "Camas y Muebles para perros" ["level"]=> int(2) } [3]=> array(3) { ["id_linio_category"]=> int(18985) ["name"]=> string(16) "Casa para Perros" ["level"]=> int(3) } [4]=> array(3) { ["id_linio_category"]=> int(18984) ["name"]=> string(21) "Colchones para perros" ["level"]=> int(3) } [5]=> array(3) { ["id_linio_category"]=> int(18983) ["name"]=> string(17) "Camas para Perros" ["level"]=> int(3) } [6]=> array(3) { ["id_linio_category"]=> int(18982) ["name"]=> string(29) "Camas de Plastico para Perros" ["level"]=> int(3) } [7]=> array(3) { ["id_linio_category"]=> int(18981) ["name"]=> string(29) "Camas Ortopedicas para Perros" ["level"]=> int(3) } [8]=> array(3) { ["id_linio_category"]=> int(18980) ["name"]=> string(19) "Tapetes para Perros" ["level"]=> int(3) } [9]=> array(3) { ["id_linio_category"]=> int(18979) ["name"]=> string(30) "Almohadas y Fundas para perros" ["level"]=> int(3) } [10]=> array(3) { ["id_linio_category"]=> int(18978) ["name"]=> string(20) "Corrales para Perros" ["level"]=> int(3) } [11]=> array(3) { ["id_linio_category"]=> int(18977) ["name"]=> string(27) "Puertas y Rejas para Perros" ["level"]=> int(3) }
How can I get value from the foreach for each attribute? Thanks