I tend do do something similar here:

I usually set up my arrays and then access them later using the GLOBALS
superglobal array. For some projects I tend to use multidimensional
arrays because I can do something like.

$config['db']['name']   = 'something';
$config['db']['user']   = 'someone';
$config['db']['pass']   = 'password';
...

This can sometimes be an over kill, however that could work for you.

--
BigDog

On Wed, 2003-08-13 at 08:19, CPT John W. Holmes wrote:
> From: "Hardik Doshi" <[EMAIL PROTECTED]>
> > I have following options for working with the
> > configuration files with the relatively large web
> > application.
> >
> > 1. Configuration variables using the DEFINE.
> >
> > 2. Array - Each configuration variable as an array
> > element.
> >
> > 3. PHP.INI like config files.
> 
> A combination of #3 and #2. Store the data in a php.ini-style config file
> and use parse_ini_file() to read it into an array.
> 
> You could even merge the array into the $_SERVER (or any other superglobal)
> array so that your config vars are available in functions without having to
> make anything global.
> 
> ---John Holmes...
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to