Ver Mensaje Individual
  #5 (permalink)  
Antiguo 02/01/2006, 09:05
Cluster
O_O
 
Fecha de Ingreso: enero-2002
Ubicación: Santiago - Chile
Mensajes: 34.417
Antigüedad: 22 años, 3 meses
Puntos: 129
Cita:
Iniciado por Pleniluni0
aqui te dejo una funcion:

Código PHP:
function db_array($result)
{
   
$res_array = array();

   for (
$count=0$row = @mysql_fetch_array($result); $count++)
     
$res_array[$count] = $row;

   return 
$res_array;

Espero que te sirva.
La función que planteas . .es lo mismo que :

while($fila = mysql_fetch_assoc($result)) {
$filas[] = $fila;
}

Si lo quieres ver como función:

Código PHP:
function db_array(
   global 
$result;

   
$filas=array();
   while(
$fila mysql_fetch_assoc($result)) { 
      
$filas[] = $fila
   } 
   return 
$filas;

Un saludo,