I'm looking to have a link that if a user presses it generates a random number, that number is then compared to a bunch of if statements to do something e.g something like this:

```
$value = rand(1,1000);

```

Then if statements:

```
if ($value >= 1 && $value <= 10) {
// do something
} elseif ($value >= 11 && $value <= 20) {
// do something else
} .... etc

```

Each random click/number will only relate to one of the if statements, so only one output should happen.

This doesn't seem the most logical/simplest way to do this. Unsure what the best method would be here. Could anyone point me in the right direction of other methods to achieve something like this? Thanks!