Ver Mensaje Individual
  #9 (permalink)  
Antiguo 22/07/2012, 22:42
iaterck
 
Fecha de Ingreso: julio-2012
Ubicación: mexico
Mensajes: 12
Antigüedad: 11 años, 9 meses
Puntos: 1
Respuesta: random sin repeticion

ya lo resolvi... es algo super estupido largo y redundante pero cada q acualizo la pagina funciona... ya lo probe... lo pogo por si a alguien le sirve
Código PHP:
$z rand(1,10);
$j true;
$d rand(1,10);
while (
$j) {
    
            if(
$d != $z){
                 
$j false ;
                 echo 
'fin <br>';
               }   
                else{
                
$d rand(1,10);
                
                }
}

$j true;
$f rand(1,10);
while (
$j) {
    
            if(
$f != $z  && $f != $d){
                 
$j false 
                 echo 
'fin <br>';
               }   
                else{
                
$f rand(1,10);
                
                }
}


$j true;
$g rand(1,10);
while (
$j) {
    
            if(
$g!= $z  && $g != $d && $g != $f){/
                 
$j false 
                 echo 
'fin <br>';
               }   
                else{
                
$g rand(1,10);
                
                }