Get list of particular category and its subcategory in wordpress

How to get list of particular category and its subcategory in wordpress – PHP Cluster

Hi friends, today i am going to discuss about how to get particular list of category and its subcategory in wordpress with its corresponding links. With wordpress simple function and its arguments we can get category list, only need to configure out wordpress function and its arguments. Jus see an example which are mentioning below in detail.

<?php $myCat = get_cat_ID($myCatName);   ?>
<ul>
<?php 
wp_list_categories( 'title_li=&include='.$myCat);   
 //getting  top level category   
?>
<?php
 wp_list_categories( 'title_li=&child_of='.$myCat); 
// children category for above mentioned top level category  
?>
</ul>

In place of $myCatName just put the name of category which you want to get for listing.