vendredi 7 avril 2017

Make a rand with digits and do not allow 'echo' with repeated results up to 7 digits inside each ke

Make a rand with digits and do not allow 'echo' with repeated results up to 7 digits inside each key

$myarray = array("1,9,8,2,6,4,8,2,1,7,9,2,1,5,7","4,5,8,7,4,5,2,1,4,5,6,2,1,4,5,","4,8,1,3...","","",);

A condition, not to accept values with 7 previously repeated sequences of up to 7 digits in the above arrays: Are not only 7 first, but 7 digits all over the key: Let's use as an example, the first key, if the mt_rand, return as a result, one of these sequences:

1,9,8,2,6,4,8 ou esta: 8,2,6,4,8,2,1 ou esta: 4,8,2,1,7,9,2 the mt_rand run again.

Until processing an unedited result up to 6 sequential digits (the objective is to have at most 6 sequences that have happened before, the more unedited the results the better). So: echo

Would a better regex expression be applicable?




Aucun commentaire:

Enregistrer un commentaire