URL key of a category in Magento
How can I get the URL key of a category in Magento. I have added this text in URL key field -
This is the code which I am trying -
$_categories = Mage::getModel('catalog/category')->getCollection()
->addAttributeToSelect('name')
->addAttributeToSelect('is_active');
<?php foreach($_categories as $_category): ?>
<a href="<?php echo $_category->getCategoryUrl($_category); ?>">
<?php endforeach; ?>
My output is showing like this -
<a href="">
<span>Manual Tile Cutters</span>
</a>