The cms pages do not allow php code.
You can create a template to display your content and you can include it in CMS page like this:
{{block type="core/template" template="path/to/template.phtml"}}
And put below mentioned code in this file:
<?php
$parentCategoryId = 31;
$category = Mage::getModel('catalog/category')->load($parentCategoryId );
$children = Mage::getModel('catalog/category')->getCollection()->setStoreId(Mage::app()->getStore()->getId());
$children->addAttributeToSelect('*')->addAttributeToFilter('parent_id', $category->getId())
->addAttributeToFilter('is_active', 1)//get only active categories if you want
->addAttributeToSort('name');//sort by position
?>
<div class="brands">
<ul>
<?php foreach ($children as $child){
$skin_url = $child->getImageUrl(); ?>
<li><a href="<?php echo $child->getURL();?>" title="<?php echo $child->getName();?>"><img src="<?php echo $skin_url?>" />
<span class="brand-name"><?php echo $child->getName();?></span>
</a>
</li>
<?php }?>
</ul>
</div>
Ho it will help you.