Foros del Web » Programando para Internet » PHP »

Undefined offset: 3

Estas en el tema de Undefined offset: 3 en el foro de PHP en Foros del Web. Código PHP: while (  $fila  =  mssql_fetch_row ( $csupedido ) ){                                     if (  $fila [ 3 ] ==  NULL  ){                                          $fila [ 3 ] =  $fila [ 1 ]; ...
  #1 (permalink)  
Antiguo 23/01/2008, 05:00
 
Fecha de Ingreso: enero-2008
Mensajes: 21
Antigüedad: 16 años, 2 meses
Puntos: 0
Undefined offset: 3

Código PHP:
while ( $fila mssql_fetch_row($csupedido) ){
                                    if ( 
$fila[3] == NULL ){
                                        
$fila[3] = $fila[1];
                                    }
                            if ( 
$email_prov == "" ){
                                echo 
'<tr><td valign="top" class="pedido" width="15%">&nbsp;<b>'.$fila[0].'</b><td valign="top" class="pedido" width="15%">'.ffecha($fila[3]).'<td valign="top" class="pedido" width="15%">'.ffecha($fila[1]).'</td><td width="55%">';
                            }else{
                                echo 
'<tr><td valign="top" class="pedido" width="15%">&nbsp;<a href="mailto:'.$email_prov.'?subject=Pedido TSK:'.$fila[0].'" class="proveedor" title="Enviar Observaciones por Email">'.$fila[0].'</a><td valign="top" class="pedido" width="15%">'.ffecha($fila[3]).'<td valign="top" class="pedido" width="15%">'.ffecha($fila[1]).'</td><td width="55%">';
                            }
                                echo 
cdet_pedido($fila[0]);
                            echo 
'</td></tr>';
                        } 
no se se os ocurre alguna otra forma para el listar
  #2 (permalink)  
Antiguo 23/01/2008, 05:28
 
Fecha de Ingreso: octubre-2004
Mensajes: 2.627
Antigüedad: 19 años, 5 meses
Puntos: 48
Re: Undefined offset: 3

if (!isset($fila[3])) en lugar de comparar con null.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 20:06.