Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/06/2013, 08:51
xasgay
 
Fecha de Ingreso: junio-2013
Mensajes: 18
Antigüedad: 10 años, 10 meses
Puntos: 0
Problema con variables

Hola, mi problema es que no soy capaz de llamar una variable de otro archivo, explico:

(TENGO DOS ARCHIVOS)

index.php (en http://localhost/index.php)
y
config.php (en http://localhost/config.php)


En el index.php tengo escrito:
Código PHP:
<? include ('config.php'); ?>

<?PHP echo 'Mi nombre es '.$texto_config[01].' y tengo 3 hermanos.'?>


Y en el config.php tengo escrito:
Código PHP:

<?PHP $texto_config[01] = 'Oscar'?>

Ahora, ingreso en mi navegador aquí: http://localhost/index.php y me pone esto:

Cita:
Notice: Undefined variable: texto_config in C:\xampp\htdocs\index.php on line 3
Mi nombre es y tengo 3 hermanos.

Necesito ayuda, gracias :(