Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/10/2013, 17:05
Avatar de Cuervoo
Cuervoo
 
Fecha de Ingreso: octubre-2013
Mensajes: 165
Antigüedad: 10 años, 7 meses
Puntos: 43
Respuesta: Anadir numero a duplicados PHP

Si entendi bien, podés usar dos variables que vayan contando, $x e $y.

Código PHP:
Ver original
  1. $x = 0;
  2. $y = 1;
  3. while ($row = mysqli_fetch_array($results)) {
  4.     $duplicated = $row['titulos'] ." $y<br>";
  5.    
  6.     $x++;
  7.  
  8.     if ($x % 2 == 0) {
  9.         $y++;
  10.     }
  11. }