PDA

View Full Version : When AWS data isn't available



MattM
02-01-2004, 02:11 PM
When AWS data isn't available for the reviews, the rating, etc., how do you display something like "Not available"?

Mike
02-01-2004, 02:35 PM
I just use if statements. Like if the value of AverageCustomerRating is equal to 0, I echo No rating available.

MattM
02-01-2004, 02:46 PM
How would you do this with the reviews?

Mike
02-01-2004, 02:46 PM
Same way.

MattM
02-01-2004, 02:47 PM
You would use 0 as a value if no reviews are available?

MattM
02-01-2004, 02:50 PM
if $Reviews = "0" then echo "No reviews available."
Would that work?

Kings
02-01-2004, 03:42 PM
if (is_array($details['Reviews']['CustomerReviews'])) {
// The reviews are available
} else {
// No reviews
echo "No Reviews";
}