Get only root category name in Magento

In this we get only root category name.
get store category and check with if condition that is category is more then is 0 or not.
Then use foreach loop print root category name.


Here is code......
<?php $gethelper = Mage::helper('catalog/category');
$rootcate = $gethelper->getStoreCategories();
   if (count($rootcate) > 0)
{
foreach($rootcate as $category)

echo $category->getName();

}
}
?>

Labels: