<?php 
    $c = new Criteria();
    $c->add(TblcategoryPeer::CG_PARENTID , -1);
    $cats = TblcategoryPeer::doSelect($c);
    $tree['']='';
    foreach ($cats as $cat){
        $tree[$cat->getCgId()] = $cat->getCgName();
    }
    $catSelected = $sf_params->get('subject');
    echo select_tag("subject", options_for_select($tree, $catSelected));
?>