跳至 [1] [全屏预览]
public function explodes($str){ $return = []; $array = []; foreach(explode(",",$str) as $k => $v){ $return = array_merge($return,(strpos($v,'-') && $array = explode('-',$v))?range($array[0],$array[1]):[$k=>intval($v)]); } return $return; }