I'm attempting to display a category title inside a module position.

I attempted:

<?php echo $listing['Category']['title'];?>

It didn't work.

I adopted this link: http://www.howtojoomla.net/2008060586/how-tos/templates/how-to-display-your-page-title-in-your-template-joomla-15

However it shows the content title and that i require the category one. focusing on joomla 1.7

I'll really appreciate if anybody can provide us a small pointer.



According to the posters comment within the OP:

    $db = &JFactory::getDBO(); 
    $id = JRequest::getString('id'); 
    $db->setQuery('SELECT #__categories.title FROM #__content, #__categories WHERE #__content.catid = #__categories.id AND #__content.id = '.$id); 
    $category = $db->loadResult();
    echo $category;