What I need is to create five random integer (say `rand(1,5)`). Then, I generate a score based on these numbers. For instance, if I get a result of `1,2,3,4,5` then that would equal a zero score, but if I got `1,1,3,4,5` that would be 1 as we have a pair. Similar to a poker kind of scoring, so five of the same number would be a "full house" thus resulting in the highest score.

How would I go about the scoring system, even if it is just the mathematical equation?

More detail:

1-5 will hold separate images and then will be fought against "The House" which will have identical code to the user to determine the winner. Here's some example draws and the score they would receive:

```
1,2,3,4,5 = score 0
1,1,2,3,4 = score 1 (1 pair)
1,1,2,2,4 = score 2 (2 pair)
1,1,1,3,4 = score 3 (3 of a kind)
1,1,1,1,5 = score 4 (4 of a kind)
1,1,1,3,3 = score 5 (full house)
1,1,1,1,1 = score 6 (5 of a kind)

```

The combination of numbers is irreverent if they score 6 and the house scores 6, it's a tie.

```
    if (isset($_POST['play'])) {
    $rand1 = rand(1, 5);
    $rand2 = rand(1, 5);
    $rand3 = rand(1, 5);
    $rand4 = rand(1, 5);
    $rand5 = rand(1, 5);
    if ($_POST['bet'] <= $user_data['coins']) {
        if ($_POST['bet'] < 999999999) {
            if ($_POST['bet'] > 0.99) {
                if ($user_data['coins'] >= 1) {
                    $array = array($rand1,$rand2,$rand3,$rand4,$rand5);
                    print_r(array_count_values($array));
                    echo $rand1.', '.$rand2.', '.$rand3.', '.$rand4.', '.$rand5;

                    Array( // Here I don't understand
                    1 => 3,//
                    2 => 1,//
                    3 => 1 //
                    );
                }
            }
        }
    }   
}

```

This outputs ; Array ( [5] => 2 [4] => 2 [1] => 1 ) 5, 5, 4, 4, 1