[code]<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
loaded dice
loaded dice
loaded dice
Please refresh this page in the browser to roll another die.
[/code] [php]<?php// loaded dice, should roll the number 1 half the time out of a total of 6.
$roll1 = rand(1,6);
if (rand(0,1))
{
$roll = rand(2,6);
}
else
{
$roll = 1;
}
$roll2 = rand(1,6);
print <<<HERE
Rolls normal roll:
You rolled a $roll2.
Rolls the number 1 half the time:
You rolled a $roll1.
HERE;
?>[/php]