Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/05/2009, 16:30
Avatar de argy
argy
 
Fecha de Ingreso: octubre-2007
Ubicación: Longitud 75º Latitud 18º Sur
Mensajes: 614
Antigüedad: 16 años, 6 meses
Puntos: 18
Respuesta: Ayuda con Array

quieres llenar un array con el resultado de la consulta?

Código :
Ver original
  1. <?php
  2. $result=mysql_query("SELECT id,descripcion FROM catalogodescripcion",$link);
  3. $new_array=array();
  4. if(mysql_num_rows($result)>0)
  5. {
  6. while($row = mysql_fetch_array($result))
  7. {
  8. $new_array[]=$row[1];
  9. }
  10. }
  11. print_r($new_array);
  12. ?>
__________________
Software libre para un mundo libre.

Eventualmente en el foro.