getCateName() public static method

根据分类id获取分类名
public static getCateName ( type $id, type $level = null ) : type
$id type
$level type
return type
Example #1
0
 public static function cateInfo($data)
 {
     $str = '';
     $str .= '一级分类:' . ARCates::getCateName($data['cate_1_id'], ARCates::LEVEL_ONE) . '<br />';
     $str .= '二级分类:' . ARCates::getCateName($data['cate_2_id'], ARCates::LEVEL_TWO) . '<br />';
     if ($data['cate_3_id'] > 0) {
         $str .= '三级分类:' . ARCates::getCateName($data['cate_3_id'], ARCates::LEVEL_THREE);
     }
     return $str;
 }