How to convert an array to a collection object in Magento?
Scenario Suppose say we have an array of data fetched from the database. And we want to merge it with Magento collection object or want to provide the data as collection object to the view(template) file. Solution <?php $resource = Mage::getModel(‘core/resource’); $connection = $resource->getConnection(‘core_read’); $sql = “SELECT * FROM custom_table WHERE some_field = ?”; $rows …