Magento 1.9 How to select multiple categories by ids at once

I was looking for this very long time and I had to dig for a very long time to find it, hence it is so simple.

$categoriesIDs = [125,250];
$categories = Mage::getModel('catalog/category')
              ->getCollection()
              ->addAttributeToFilter('entity_id', array('in'=>$categoriesIDs))
              ->addAttributeToSelect('name');

 


Lukas
Lukas Stranovsky
I am the guy who made this. Sorry for typos.