Ver Mensaje Individual
  #3 (permalink)  
Antiguo 31/08/2008, 22:35
Avatar de Ronruby
Ronruby
 
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 10 meses
Puntos: 416
Respuesta: error en do while

Código PHP:
<?php
 
 $num 
= Array();
 
reset($num);
 for(
$i=1;$i<=10;$i++)
 {
   
$num[$i]=rand(1,10);
    if(
$i>1)
    {
       for(
$x=1$x<$i$x++)
       {
         if(
$num[$i]==$num[$x])
         {
           
$i--;
           break;
         }
      }
   }
 }
 foreach(
$num as $valor)
 {
   echo 
$valor." ";
 }
?>
http://www.nociondigital.com/webmast...talle-213.html