public static function stringToArray($value)
    {
        $value = strtoupper($value);
        $newValue = [];
        foreach (explode(';', $value) as $part) {
            // Skipping empty parts.
            if (empty($part)) {
                continue;
            }
            list($partName, $partValue) = explode('=', $part);

            // The value itself had multiple values..
            if (false !== strpos($partValue, ',')) {
                $partValue = explode(',', $partValue);
            }
            $newValue[$partName] = $partValue;
        }

        return $newValue;
    }
public static function stringToArray($value)
    {
        $value = strtoupper($value);
        $newValue = [];
        foreach (explode(';', $value) as $part) {
            // Skipping empty parts.
            if (empty($part)) {
                continue;
            }
            list($partName, $partValue) = explode('=', $part);

            // The value itself had multiple values..
            if (false !== strpos($partValue, ',')) {
                $partValue = explode(',', $partValue);
            }
            $newValue[$partName] = $partValue;
        }

        return $newValue;
    }
public static function stringToArray ( $ value ) { $ value = strtoupper ( $ value ) ; $ newValue = [ ] ; foreach ( explode ( ';' , $ value ) as $ part ) { // Skipping empty parts. if ( empty ( $ part ) ) { continue ; } list ( $ partName , $ partValue ) = explode ( '=' , $ part ) ; // The value itself had multiple values.. if ( false !== strpos ( $ partValue , ',' ) ) { $ partValue = explode ( ',' , $ partValue ) ; } $ newValue [ $ partName ] = $ partValue ; } return $ newValue ; }
Parses an RRULE value string, and turns it into a struct-ish array.

@param string $value

@return array
Parses an RRULE value string and turns it into a struct - ish array .