//品牌名称
$brandnames = explode(',',M ( 'goodspromotion' )->order('rule_1')->where ("state = 1 and rule_style= 3")->getField('promotion_goods'));
$count_brandnu = count($brandnames);
for($start=0;$start<$count_brandnu;$start++){
$brandname = M ( 'brand' )->where ("id = $brandnames[$start]")->getField('brand_name').'和'.$brandname;
}
$brandname = substr($brandname,0,strlen($brandname)-3); //UTF类型 在数据库一个汉字占3个字节