dimanche 19 février 2017

php How to roll random key?

How the way to roll up array random key?

$key = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j");
$randomKeys = array_rand($key,1);

echo $key[$randomKeys];

I want to roll up the key when randomized a then b then c NOT a then h then k




Aucun commentaire:

Enregistrer un commentaire