<?php 
if(isset($channel_parentid) && $channel_parentid !== ''):
$channel_nav_array=getChannelChild($channel_parentid); 
if($channel_nav_array):
?>
<div id="menu">
<ul>
<?php
foreach($channel_nav_array as $row) :
?>
<li><a href="channel.php?id=<?php echo $row['id'] ?>"><?php echo $row['title'] ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php
endif;
endif;
?>