Ver Mensaje Individual
  #3 (permalink)  
Antiguo 08/12/2012, 11:41
helion
 
Fecha de Ingreso: mayo-2010
Mensajes: 215
Antigüedad: 14 años
Puntos: 4
Respuesta: problemas con if o while

Código PHP:
<? $qmnews2 = @mysql_query("SELECT * FROM users_online  limit 0,20");
if(
$userid mysql_fetch_array($qmnews2)){ ?>
eso uso para identificar a los usuarios en linea ... respectivamente en la tabla de coordenadas cada tabla tiene una coordenada algo asi :


Código PHP:
<table width="87" border="1">
  <tr>
    <td width="28"><? if($userid[x]='1' and  $userid[y]='2'){echo'usuario1';}?></td>
    <td width="43"><? if($userid[x]='2' and  $userid[y]='2'){echo'usuario2';}?></td>
  </tr>
  <tr>
    <td><? if($userid[x]='1' and  $userid[y]='1'){echo'usuario3';}?></td>
    <td><? if($userid[x]='2' and  $userid[y]='1'){echo'usuario4';}?></td>
  </tr>
</table>