$num = 0;
Código PHP:
function s_print_title_desc($file_n) {
$file = @file($file_n);
$num = 0; // agregar
if ($file) {
$line_complete = implode('', $file);
eregi("<title>(.*)</title>", $line_complete, $out);
$title = trim($out[1]);
if($title) $line_complete = str_replace($title, "", $line_complete);
$line_complete = strip_tags($line_complete);
$line_complete = trim($line_complete);
$line_complete = trim(substr($line_complete, 0, 400));
echo "<li><b><a href=\"$file_n\">
";
if (isset($title))
echo "$title</a></b> <font size=\"-1\">- <i>$file_n</i></font>";
else
echo "$file_n</a></b>";
echo "<br>$line_complete...\n<br> ";
}
else {
$num = ++$num;
echo "<a href=\"$file_n\"><b>$num</b> </a>";
}
}
BUSCAR LIENEA:
//************************************************** ***********//