$tbl_comments = new tbl_comments(); //create a comment object $commentList = $tbl_comments->GetList(array(array("ref", "=", $ref))); $count = count($commentsList); if($count=0){ echo("
Currently there are no comments for this news article.
"); } else{ foreach ($commentList as $tbl_comments){ echo ("
". $tbl_comments->user ." says:
"); echo ("". $tbl_comments->comment ."
"); if($_SESSION['Auth_Level'] == 'admin'){ echo(""); } echo ("