function getcat($catid) { global $db; $catids=explode(',',$catid); $catid=$catids[1]; $r=$db->get_one("select catname from {$db->pre}category where catid=".$catid); $catname=$r['catname']; return $catname; }调用方法 {getcat($t[catid])}
function getcat($catid) { global $db; $catids=explode(',',$catid); $catid=$catids[1]; $r=$db->get_one("select catname from {$db->pre}category where catid=".$catid); $catname=$r['catname']; return $catname; }调用方法 {getcat($t[catid])}