smarty: <td>{$info.receive_group|modifier:identity_cate}</td>
php: gloabel.lib.php
/**
* 獲取用戶身份
* @param str $operate
* @return string
*/
function identity_cate($identity){
$identitys = array('all'=>'所有會員','institutions'=>'採購商','supplier'=>'供應商','distributor'=>'分銷商','other'=>'其他');
$cats = "";
$categorys = explode(',', $identity);
foreach($categorys as $val){
if($val){
$cats .= $identitys[$val].",";
}
}
return $cats;
}