Je rencontre une erreur => Notice: Uninitialized string offset: 16 in ... lorsque je veux générer un "string" aléatoire avec mt_rand
Code : Tout sélectionner
$characters = "0123456789abcdef";
$string = 0;
for ($i = 0; $i < 50 ; $i++) {
$string .= $characters[mt_rand(0, strlen($characters))];
}
J'ai un peu près tout tenté mais je trouve pas.
Une idée ?
Merci pour votre aide