Ver Mensaje Individual
  #11 (permalink)  
Antiguo 04/10/2012, 04:35
Avatar de Naahuel
Naahuel
 
Fecha de Ingreso: marzo-2011
Ubicación: localhost
Mensajes: 796
Antigüedad: 13 años, 1 mes
Puntos: 192
Respuesta: no me reconoce la variable de session[0]['loquesea']

Hombre, no me voy a poner a copiar y ejecutar todo ese código :P

Haciendo pruebas, encontré que esto es válido:
Código PHP:
Ver original
  1. $_SESSION['id'] = 0;
  2. $_SESSION[$_SESSION['id']]['nombre'] = 'Nombre';
  3. $_SESSION[$_SESSION['id']]['cantidad'] = 'Cantidad';
  4. $_SESSION[$_SESSION['id']]['precio'] = 'Precio';
  5.  
  6. $_SESSION['id'] = 1;
  7. $_SESSION[$_SESSION['id']]['nombre'] = 'Otro Nombre';
  8. $_SESSION[$_SESSION['id']]['cantidad'] = 'Otra Cantidad';
  9. $_SESSION[$_SESSION['id']]['precio'] = 'Otro Precio';

Lo cual tira:
Código:
array
  'id' => int 1
  0 => 
    array
      'nombre' => string 'Nombre' (length=6)
      'cantidad' => string 'Cantidad' (length=8)
      'precio' => string 'Precio' (length=6)
  1 => 
    array
      'nombre' => string 'Otro Nombre' (length=11)
      'cantidad' => string 'Otra Cantidad' (length=13)
      'precio' => string 'Otro Precio' (length=11)
Tu problema es que no estás creando el índice 0 de $_SESSION. Fijate bien qué línea y qué archivo te dice, empecemos por ahí.
__________________
nahueljose.com.ar