Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/12/2011, 18:45
rafucho1326
 
Fecha de Ingreso: junio-2011
Ubicación: Guatire - Edo. Miranda, Venezuela.
Mensajes: 4
Antigüedad: 12 años, 10 meses
Puntos: 0
Pregunta Problema: Notice: Undefined offset

Código PHP:
include "Class_Producto.php";
        
$fp fopen("Pantalon.txt""r");
            while (!
feof($fp)){
                echo 
"<tr>";
                 
$fila fgets($fp);
                 
$arreglo_datos explode("," $fila);
                 
$nombre $arreglo_datos[0];
                 
$categoria $arreglo_datos[1];
                 
$cantidad $arreglo_datos[2];
                 echo 
"<td>$nombre</td>";
                 echo 
"<td>$categoria</td>";
                 echo 
"<td>$cantidad</td>";
                }
                echo 
"</tr>"
Hola tengo el siguiente código yo quiero crear un arreglo con la cadena que sale en mi archivo txt. Si ven ya lo realice pero cuando hago la corrida me sale el siguiente error.

Notice: Undefined offset: 1 in C:\wamp\www\Prueba Estudiante\Productos.php on line 26

Notice: Undefined offset: 2 in C:\wamp\www\Prueba Estudiante\Productos.php on line 27


A que se debe esto?