I am Getting the sub categories of current categories but it is showing in random way or may be according to the category ID as follows:
<?php $category_ido = Mage::getModel('catalog/layer')->getCurrentCategory()->getId(); $categories = Mage::getModel('catalog/category')->load($category_ido)->getChildren(); $catArray = explode(',', $categories); ?> <?php if($categories) { ?> <div class="category-products category-products-sub"> <ul class="products-grid"> <?php foreach($catArray as $child) { $_child = Mage::getModel( 'catalog/category' )->load( $child ); ?> <li class="item <?= $class ?> sub-cat-items"> <a href="<?php echo $_child->getURL() ?>" title="<?php echo $this-> htmlEscape($_child->getName()) ?>"><img src="<?php echo Mage::getBaseUrl('media').'catalog/category/'.$_child->getThumbnail() ?>" width="580" max-height="300px" alt="<?php echo $this->htmlEscape($_child->getName()) ?>" /></a> <h1><?php echo $this->htmlEscape($_child->getName()) ?></h1> </li> <?php } ?> </ul> </div> <?php } ?> So now i want to sort them Alphabetically how i can achieve that.