rendered paste bodyHere's the function that gets calledfunction comment_link($news_ID) { global $TBL_COMMENTS, $COMMENTS_ENABLED; if ($COMMENTS_ENABLED == 1) { $operator_comments = new DBEngine; $operator_comments->execute("SELECT * FROM " . $TBL_COMMENTS . " ORDER BY comment_ID asc"); $comment_count = $operator_comments->countrows(); if ($comment_count == 1) { $comment_link_string = "<a href='./single.php?news_ID=" . $news_ID . "#comments'>1 Comment</a>"; } else { $comment_link_string = "<a href='./single.php?news_ID=" . $news_ID . "#comments'>" . $comment_count . "Comments</a>"; } echo $comment_link_string; } }And here's the foreach loop that it breaks<?php if ($posts) { foreach($posts as $post) { ?> <?php echo $post['title']; ?><br /> <?php echo $post['body']; ?><br /> <?php echo $post['author']; ?><br /> <?php echo $post['date']; ?><br /> <?php comment_link($post['ID']); ?> <br /><br /><br /><br /> <?php } } else { ?> There aren't any posts! <?php } ?>