Malcolm JC Clark wrote:
I thought it would be a good idea to use parse_ini_file instead of doing
require_once("config.ini"). However, what do I do about arrays that i had in
my config file, cos parse_ini_file() does not like them. eg:

favFoods = array('this','that','other',)

I notice my php.ini file is arranged in a similar format, and where there
are multiple options they are separated by a colon, like include_dir =
./:../ or something similar.

You can use parse_ini_file and then just explode() the ones that you need to make into an array based upon whatever separator you used.


---John Holmes...

Amazon Wishlist:

php|architect: The Magazine for PHP Professionals –

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to