Magento get current category name: You can get the category id and category name on product detail page as below
Magento get current category name Example
Use the following code to get current category detail.
<?php $catId = Mage::getModel('catalog/layer')-?>getCurrentCategory()->getId(); $catName = Mage::getModel('catalog/layer')->getCurrentCategory()->getName(); ?>
Which will give the category name and id.