Voting

: six minus six?
(Example: nine)

The Note You're Voting On

Dmitry S
16 years ago
Alternative XML syntax highlighting.

<?php
function xml_highlight($s)
{
$s = htmlspecialchars($s);
$s = preg_replace("#&lt;([/]*?)(.*)([\s]*?)&gt;#sU",
"<font color=\"#0000FF\">&lt;\\1\\2\\3&gt;</font>",$s);
$s = preg_replace("#&lt;([\?])(.*)([\?])&gt;#sU",
"<font color=\"#800000\">&lt;\\1\\2\\3&gt;</font>",$s);
$s = preg_replace("#&lt;([^\s\?/=])(.*)([\[\s/]|&gt;)#iU",
"&lt;<font color=\"#808000\">\\1\\2</font>\\3",$s);
$s = preg_replace("#&lt;([/])([^\s]*?)([\s\]]*?)&gt;#iU",
"&lt;\\1<font color=\"#808000\">\\2</font>\\3&gt;",$s);
$s = preg_replace("#([^\s]*?)\=(&quot;|')(.*)(&quot;|')#isU",
"<font color=\"#800080\">\\1</font>=<font color=\"#FF00FF\">\\2\\3\\4</font>",$s);
$s = preg_replace("#&lt;(.*)(\[)(.*)(\])&gt;#isU",
"&lt;\\1<font color=\"#800080\">\\2\\3\\4</font>&gt;",$s);
return
nl2br($s);
}
?>

<< Back to user notes page

To Top