While working in Magento, you might have seen that there are various model defined like sales,catalog etc.
I am writing here a script for working with customer model.
<?php $customerModel = Mage::getModel('customer/customer'); //get customer model $customerCollection = $customerModel->getCollection(); $customers = array(); $i = 0; foreach ($customerCollection as $customer) { $customer = $customerModel->load($customer->getId()); $customers[$i]['name'] = $customer->getName(); $customers[$i]['email'] = $customer->getEmail(); $i++; } foreach($customers as $k => $v) { echo 'Customer name :'.$v['name']; echo 'Customer Email :'.$v['email']; echo '<br/>'; } ?>
I hope it is useful to you.
Thanks dude… helped me in emergency
I am grateful to you