For the Ternary Operator impaired, here's the same thing NogDog is doing using normal if/else syntax, rather than the ternary.
$percent = 10;
if(rand(1, 100) <= $percent) {
$prize_result = "A bucket of Gold!";
} else {
$prize_result = "Go Home!";
}
echo $prize_result;
The syntax is a bit longer, but it's worth it, rather than trying to decipher what's going on in Ternary coding, since it's a small portion of coders who really know what it is, or how to properly use it... (No offense NogDog, if that's your coding style... I prefer not to use the ternary when helping others, and in fact, I tend to not recommend its usage by anyone).