之后是否有可能使混洗数组不变?

I have a card game with mixed cards (array with 100 cards, value 1-100, shuffled - alternative would be to random pick by id).

Each player gets a set of cards. The cards are played with POST/ submit.

My problem is that every time I post, the cards are mixed again. But the value of the cards should stay constant while assigned to card-variables.

Is there any possibility to make a random constant afterwards, so that the variable doesn´t get re-assigned when posting/loading?

function mixcarddeck()
{
    $carddeck = array(100);
    for ($i = 0; $i < 100; $i++) {
        $carddeck[$i] = $i + 1;
    }
    shuffle($carddeck);
}

function givecardvalue($i)
{
    $carddeck = mixcarddeck();
    return $carddeck[$i];
}

Thanks a lot in advance!

you can use $$ to make a dynamic variable in php instead of single $ if thats, what u want

 $variable="name";
    $$variable;

$$variabe is now (same as $name)

now generate random constant and make new variables each time so that new variable is assigned each time