Get Category Name From Category Id Magento

$mainCategory = Mage::getModel(‘catalog/category’)->load($categoryId);
$mainCategoryName = $mainCategory->getName();

Share