firecat318
09-14-2009, 11:46 PM
Here is my code, its simple, I want php to generate a random number, then if its inbetween 1-5 echo a certain thing, or else if its 6-10 echo something else.
<?
$rand = rand(1,10)
if($rand == 1 || 2 || 3 || 4 || 5)
{
echo "<h1>one thing</h1>";
}
if($rand == 6 || 7 || 8 || 9 || 10)
{
echo "<h1>other thing</h1>";
}
?>
all that happens now is a blank page
thanks i'm dumb :thumbsup:
<?
$rand = rand(1,10)
if($rand == 1 || 2 || 3 || 4 || 5)
{
echo "<h1>one thing</h1>";
}
if($rand == 6 || 7 || 8 || 9 || 10)
{
echo "<h1>other thing</h1>";
}
?>
all that happens now is a blank page
thanks i'm dumb :thumbsup: