Podemos usar un archivo.
return array( 'hostname' => 'localhost', 'database' => 'test', 'username' => 'test', 'password' => 'test', );
Y al incluirlo a otro podemos hacer que regrese el valor.
$config = include 'config.php';
Yo tampoco sabía –> Devolver Includes como funciones
Tags: PHP, Programación
:O