Comments Display + Comments Counter

4 posts by 2 authors in: Forums > CMS Builder
Last Post: July 2, 2010   (RSS)

Re: [Illume Magazine] Comments Display + Comments Counter

By gkornbluth - July 1, 2010

Hi,

Can you work with something like a simple record counter?

Before the foreach loop that pulls the comments

<?php $count = 0; ?>

Inside the foreach loop

<?php $count++; ?>

To print the number of comments:

There are <?php echo $count ?> comments.

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Comments Display + Comments Counter

Hi,

Thanks for the post. I did that, but I receive the following error: Notice: Undefined variable: count in /home/content/i/l/l/illumemedia/html/newTemplates/articleDetail.php on line 172

Re: [Illume Magazine] Comments Display + Comments Counter

By gkornbluth - July 2, 2010

If it's working, put an @ before the $ in $count=0

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php