Php Help… Should be easy if you know PHP
-
Hi,
Thanks for taking the time to look at this question.
I have DGReview running on my site, and I’m trying to make it so that the line “This post has a rating of [blank] out of 10” doesn’t show until someone has posted a review.
So to reiterate the problem: I would like to have this line of text show if there are some reviews, but it still shows even if there aren’t reviews, it just doesn’t have a number in the spot where it says “blank” above.
here is the code…
<strong>Average Post <?php echo dgrs_display_post_ratings($post->ID); ?> out of 10.</strong> Add your own rating for this post <a href="#comments" title="video game rating">here.</a>
And then in regular english, what I’m hoping this would look like is:
If <?php echo dgrs_display_post_ratings($post->ID); ?> is not null, then display: <strong>Average Post <?php echo dgrs_display_post_ratings($post->ID); ?> out of 10.</strong> Else, if <?php echo dgrs_display_post_ratings($post->ID); ?> is null, only display: Add your own rating for this post <a href="#comments" title="video game rating">here.</a>
Does anyone know how to do this? I would be VERY grateful!
Thanks, Brad
- The topic ‘Php Help… Should be easy if you know PHP’ is closed to new replies.