Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How will you get first and last item from the collection in magento?



How will you get first and last item from the collection in magento?..

Answer / Meenu Tiwary

To get the first item from a collection, you can use: $collection->getFirstItem(). To get the last item, you can use: endIterator() and rewind(), then getCurrent(): $lastItem = reset($collection->getItterator()); $collection->rewind(); echo $collection->getCurrent()

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Magento PHP Interview Questions

How much does magento 2 cost?

1 Answers  


How can I tell if a site is using magento?

1 Answers  


What technology used by magento?

1 Answers  


What is the best ecommerce platform 2019?

1 Answers  


How to check magento version?

1 Answers  


What is magento enterprise?

1 Answers  


What was the initial release date of magento?

1 Answers  


State whether namespace is mandatory while creating a custom module in magento?

1 Answers  


How can I prepare for magento 2 exam?

1 Answers  


how you can enhance the Magento performance?

1 Answers  


How to add review list on product page of magento?

1 Answers  


what is the architecture of Magento? What are the different versions of Magento?

1 Answers  


Categories