Right now, over at www.monkeyclaus.org, the following script is
getting to the 9th run through and dying after the line:
echo "...";
You'll admit that is a strange place to die. I've hit refresh several
times and it keeps happening. When I view page source, the last thing
that shows up is the "...". The date doesn't print, nor does the
closing the div tag.
Can anyone suggest a place I should start to look for the problem? It
doesn't seem possible it is here, though it looks that way.
function mostRecentComments($number=10) {
global $sql, $config;
extract($config);
// 06-17-03 - So the purpose of this function is to allow the
designer to list blurbs from recent comments
// in the margins. The number of comments returned is variable,
depending on the number given as an argument
// to the function. If it is 20 then the most recent 20 comments get
returned. The title or headline of the
// comment gets wrapped in a link so people can go read it, and from
there of course, they can link back to
// the page on which it is posted.
$dbArray = $sql->getAllTypeFromDb("comments");
$dbArray = array_reverse($dbArray);
echo "<div class=\"recentComments\">";
echo "These are the most recent $number comments:<br>";
for ($i=0; $i < $number; $i++) {
$row = $dbArray[$i];
$date = outputDate($row[3], 1);
$commentLink = $pathToIndex."?comment[]=";
$commentLink .= $row[0];
$row[2] = substr($row[2], 0, 80);
$row[2] = strip_tags($row[2]);
echo "<div class=\"recentCommentsEach\"><a
class=\"recentCommentLinks\" href=\"$commentLink\">\n";
echo $row[1];
echo "</a>\n";
echo " - ";
echo $row[2];
echo "... ";
echo "<br>\n";
echo $date;
echo "</div>\n\n";
}
echo "</div>";
echo "this is us after the end";
}