public static function explode($glue, $data, $limit = null)
	{
	    if (is_array($data)) {
	        $result = [];
	        foreach ($data as $k => $v) {
	            $result = array_merge($result, static::explode($glue, $v, $limit));
	        }
	        return $result;
	    } elseif (is_string($data)) {
	        if (is_array($glue)) {
	            $glue = implode('', $glue);
	        }
	        $data = preg_split('/[' . $glue . ']+/', $data, $limit);
	        $data = (array) $data;
	        $data = array_map(function ($v) { return trim($v); }, $data);
	    }
	    
	    return $data;
	}
public static function explode($glue, $data, $limit = null)
	{
	    if (is_array($data)) {
	        $result = [];
	        foreach ($data as $k => $v) {
	            $result = array_merge($result, static::explode($glue, $v, $limit));
	        }
	        return $result;
	    } elseif (is_string($data)) {
	        if (is_array($glue)) {
	            $glue = implode('', $glue);
	        }
	        $data = preg_split('/[' . $glue . ']+/', $data, $limit);
	        $data = (array) $data;
	        $data = array_map(function ($v) { return trim($v); }, $data);
	    }
	    
	    return $data;
	}
public static function explode ( $ glue , $ data , $ limit = null ) { if ( is_array ( $ data ) ) { $ result = [ ] ; foreach ( $ data as $ k => $ v ) { $ result = array_merge ( $ result , static :: explode ( $ glue , $ v , $ limit ) ) ; } return $ result ; } elseif ( is_string ( $ data ) ) { if ( is_array ( $ glue ) ) { $ glue = implode ( '' , $ glue ) ; } $ data = preg_split ( '/[' . $ glue . ']+/' , $ data , $ limit ) ; $ data = ( array ) $ data ; $ data = array_map ( function ( $ v ) { return trim ( $ v ) ; } , $ data ) ; } return $ data ; }
explode use preg_split

@param  mixed  $glue  string|array
@param  mixed  $data  string|array
@param  int    $limit
@return array
explode use preg_split