Wrap email quotes with html element
This isn't much more elegant, but maybe you like it:

$text = "Some text

&gt; Foo
&gt; Bar
&gt;&gt; Baz
&gt; Foo
";

function clean($text) {
  $result = "";
  $lines = explode("\n", $text);
  foreach($lines as $key =&gt; $line) {
    $lines[$key] = preg_replace('/(&gt;)+ /', '', $line);
  }
  return join("\n", $lines);
}

function quotes($text, $level = 1) {
  $search = str_repeat("&gt;", $level);
  $fstpos = strpos($text, $search);
  $sndpos = strrpos($text, $search);
  $sndpos = strpos($text, "\n", $sndpos);
  $middle = substr($text, $fstpos, $sndpos + 1);
  if($fstpos === false or $sndpos === false)
    return clean($middle, $search);
  $fst = clean(substr($text, 0, $fstpos), $search);
  $snd = clean(substr($text, $sndpos), $search);
  return $fst . "&lt;blockquote&gt;\n" . quotes($middle, $level + 1)  . "&lt;/blockqoute&gt;" . $snd;
}

echo quotes($text);