src/helpers/ArrayHelper.php
public static function csplit($string, $delimiter = ',')
    {
        if (is_array($string)) {
            return $string;
        }
        $res = [];
        foreach (explode($delimiter, $string) as $k => $v) {
            $v = trim($v);
            if (strlen($v)) {
                array_push($res, $v);
            }
        }

        return $res;
    }
public static function csplit($string, $delimiter = ',')
    {
        if (is_array($string)) {
            return $string;
        }
        $res = [];
        foreach (explode($delimiter, $string) as $k => $v) {
            $v = trim($v);
            if (strlen($v)) {
                array_push($res, $v);
            }
        }

        return $res;
    }
public static function csplit ( $ string , $ delimiter = ',' ) { if ( is_array ( $ string ) ) { return $ string ; } $ res = [ ] ; foreach ( explode ( $ delimiter , $ string ) as $ k => $ v ) { $ v = trim ( $ v ) ; if ( strlen ( $ v ) ) { array_push ( $ res , $ v ) ; } } return $ res ; }
Parses data, exploding the string by comma, trying to create array.

@param $string
@param string $delimiter
@return array
Parses data exploding the string by comma trying to create array .