Ver Mensaje Individual
  #10 (permalink)  
Antiguo 18/08/2013, 15:53
luciana_uru
 
Fecha de Ingreso: diciembre-2010
Mensajes: 160
Antigüedad: 13 años, 4 meses
Puntos: 1
Respuesta: Notice: Undefined variable

Muchas gracias Javieer y Hhs por la ayuda, ya lo solucione quite el while y defini las variables asi:

Código PHP:
$context['post_topic'][] = array();
 
$posts mysql_fetch_array($request);
 
$avatar_p $posts['avatar'];
 
$titulo $posts['titulo'];
 
$rango_p $posts['rango'];
 
$usuario_p $posts['usuario'];
 
$contenido_p $posts['contenido'];
 
$fecha_p $posts['fecha']; 
Y funciona de maravillas, pero es correcto ponerlo asi?
Cita:
Iniciado por hhs Ver Mensaje
Hice una prueba pero ya te contesto Javieer y el problema es ese, así que necesitas o definir la variable antes del while o que compruebes que context es un arreglo y esta definida antes de pasarlo al foreach