par
jojolapine » 15 mai 2006, 11:02
alors tu pourrais te servir de la fonction rand:
function mot($taille){
$solution=array();
for($i=0;$i<1000;$i++){ //à remplacer par une boucle while à déterminée
$taille=0;
$mot="";
while ($longueur<$taille+1){
$mot.=str(rand(97,122));
$taille++;
}
if(in_array($mot,$solution)!=true){
array_push($solution,$mot);
}
}
return $solution;
}
j'ai pas tester, ça marche surement pas, mais c'est undébut
alors tu pourrais te servir de la fonction rand:
[php]
function mot($taille){
$solution=array();
for($i=0;$i<1000;$i++){ //à remplacer par une boucle while à déterminée
$taille=0;
$mot="";
while ($longueur<$taille+1){
$mot.=str(rand(97,122));
$taille++;
}
if(in_array($mot,$solution)!=true){
array_push($solution,$mot);
}
}
return $solution;
}[/php]
j'ai pas tester, ça marche surement pas, mais c'est undébut