<?php
/* Функция подсветки PHP кода. */
function highlight($php)
{
$php = strtr($php, array ('<br />' => '','//' => 'slash'));
$php = html_entity_decode(trim($php), ENT_QUOTES, 'UTF-8');
$php = substr($php, 0, 2) != "" ? $php = "<?phpn" . $php . "n?>": $php;
$php = highlight_string(stripslashes($php), true);
$php = strtr($php, array ('slash' => '\',':' => ':','[' => '['));
return '<div class="code">'.$php.'</div>';
}
?>