Hawkee commented on a Page, Slots  -  Apr 26, 2009

Keep it up, PHP is one of the best languages to learn IMO. Would have been better to do it like this though:

<?php
  $slotone = mt_rand(1,3);
  $slottwo = mt_rand(1,3);
  $slotthree = mt_rand(1,3);
  echo "Your numbers are: $slotone $slottwo $slotthree<br \><br \>";
  if ($slotone == $slottwo and $slottwo == $slotthree) {
      echo "Congratulations! You have won!";
  } 
  else { echo "You have lost - please try again!"; }
?>

mt_rand() is better than rand() and you really only need a single if-statement.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.