企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
### 通过分类ID获取名称 **位置:** Common\Common\function.php whz 2018-06-26 **参数:** * @param int $id * @return string **调用:** > PHP 调用: get_cat_name ($cat_id) > View 模版调用: {$vo['cat_id']|get_cat_name} **完整代码:** ~~~ /** * 通过分类ID获取名称 * whz 2018-05-22 * @param $id Int * @return string */ function get_cat_name ($id) { if (empty($id)) { return ''; } $result = M('goods_category')->find($id); return $result['cat_name']; } ~~~