How to get category id by category name in magento

<?php
$category = Mage::getResourceModel('catalog/category_collection')->addFieldToFilter('name','cateNameHere'));
    $catData = $category->getData();      
 $categoryId = $catData[0][entity_id];
 echo $categoryId;
 ?>