/** * 分割字符串返回数组 * @author wjh 20141111 * @param $id * @return array * @throws CHttpException */ public static function getArrayFromString($id) { if (empty($id)) { return array(); } if (is_string($id)) { $idlist = explode(',', trim($id, ',')); } else { $idlist = BArrayHelper::removeEmpty($id); } return $idlist; }