```
<?php
        if (isset($_POST['Roll!'])) {
                    $sides = $_POST['sides'];
                    $rolled = rand(1,$sides);

                    echo "$rolled was rolled by the dice, it is now out!";
        }
?>

```

This is the code I currently have. After rolling that number, however, I want it to roll again, but without the previously rolled number, until it has rolled all number except one, which would be the winning number. I have no idea how to go about doing that. Any ideas?

EDIT: I'm sorry, I should have been more clear, thank you all for the help so far, but I also need to echo each number rolled, such as

```
echo "$rolledArray[0] was rolled, it lost.\n";
echo "$rolledArray[1] was rolled, it lost.\n";
echo "$rolledArray[2] was rolled, it lost.\n";
echo "$rolledArray[3] was rolled, it lost.\n";
echo "$rolledArray[x] was rolled, it lost.\n";
echo "$rolledArray[x] was rolled, it lost.\n";
echo "$rolledArray[50?] was rolled, it lost.";

```

EDIT AGAIN: Also I only want them to have to click Roll! once, not multiple times until they've rolled all the numbers, meaning no need for session, I think, though I could be wrong, most of you are clearly more experienced than me.

Sorry, I should have mentioned that before as well.