mercredi 1 février 2017

Php Generate random number without repeat

$C = $_POST['Cc'];
$X = $_POST['X'];
$CX = $_POST['Cc'] . $_POST['X'];

$NC = preg_replace_callback("/x/" ,function() {return rand(0,9);}, $CX);

            $New = $NC ;
            $NNew =  str_repeat($New,10);
            echo $NNew;

what's wrong when i output it , it gives me the same number How to make It Don't Give me the same Numbers ??




Aucun commentaire:

Enregistrer un commentaire