Ver Mensaje Individual
  #8 (permalink)  
Antiguo 08/12/2012, 13:02
Avatar de David
David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Respuesta: problemas con if o while

Me refería a algo como:
Código PHP:
Ver original
  1. $users = array(1 => array(), 2 => array());
  2. while($userid = mysql_fetch_array($qmnews2)){
  3.     $users[$userid['x']][$userid['y']] = $userid['user'];
  4. }
Código PHP:
Ver original
  1. <table width="87" border="1">
  2.   <tr>
  3.     <td width="28"><?php echo $users[1][1]; ?></td>
  4.     <td width="43"><?php echo $users[1][2]; ?></td>
  5.   </tr>
  6.   <tr>
  7.     <td><?php echo $users[2][1]; ?></td>
  8.     <td><?php echo $users[2][2]; ?></td>
  9.   </tr>
  10. </table>
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.