When AWS data isn't available for the reviews, the rating, etc., how do you display something like "Not available"?
When AWS data isn't available for the reviews, the rating, etc., how do you display something like "Not available"?
I just use if statements. Like if the value of AverageCustomerRating is equal to 0, I echo No rating available.
Don't you just love free internet games ?
How would you do this with the reviews?
Same way.
Don't you just love free internet games ?
You would use 0 as a value if no reviews are available?
Would that work?PHP Code:
if $Reviews = "0" then echo "No reviews available."
PHP Code:
if (is_array($details['Reviews']['CustomerReviews'])) {
// The reviews are available
} else {
// No reviews
echo "No Reviews";
}
Dennis Pallett
Bookmarks