', $code); $lines = array_combine(range(1, count($lines)), $lines); $line_count = count($lines); $pad_length = strlen($line_count); $return .= '
';
foreach($lines as $i => $line) {
$lineNumber = str_pad($i + 1, $pad_length, '0', STR_PAD_LEFT);
if ($i % 2 == 0) {
$numbgcolor = '#C8E1FA';
$linebgcolor = '#F7F7F7';
$fontcolor = '#3F85CA';
} else {
$numbgcolor = '#DFEFFF';
$linebgcolor = '#FDFDFD';
$fontcolor = '#5499DE';
}
if ($line == '') $line = ' ';
$return .= '' . $i . '' . $line . '';
}
$return .= '