public static function parseData($data)
    {
        $parsed = array();
        foreach (explode(' ', $data) as $pair) {
            if (strpos($pair, ':') > 0) {
                list($key, $value) = array_map('trim', explode(':', $pair));
                $parsed[$key] = $value;
            }
        }

        return $parsed;
    }
public static function parseData($data)
    {
        $parsed = array();
        foreach (explode(' ', $data) as $pair) {
            if (strpos($pair, ':') > 0) {
                list($key, $value) = array_map('trim', explode(':', $pair));
                $parsed[$key] = $value;
            }
        }

        return $parsed;
    }
public static function parseData ( $ data ) { $ parsed = array ( ) ; foreach ( explode ( ' ' , $ data ) as $ pair ) { if ( strpos ( $ pair , ':' ) > 0 ) { list ( $ key , $ value ) = array_map ( 'trim' , explode ( ':' , $ pair ) ) ; $ parsed [ $ key ] = $ value ; } } return $ parsed ; }
Parse a colon and space separated string into an array

@param string $data Data to parse

@return array
Parse a colon and space separated string into an array