$pos++;
}
$structure = substr($structure, strlen($text) + 2);
+ } else if ($char == '{') {
+ /**
+ * loop through until we find the matching quote,
+ * and return that as a string
+ */
+ $pos = 1;
+ $len = '';
+ while (($char = $structure{$pos}) != '}'
+ && $pos < strlen($structure)) {
+ $len .= $char;
+ $pos++;
+ }
+ $structure = substr($structure, strlen($len) + 4);
+ $text = substr($structure, 0, $len);
+ $structure = substr($structure, $len + 1);
} else if ($char == '(') {
// comment me
$end = mime_match_parenthesis (0, $structure);