views:

407

answers:

1

Hi, I'm looking for an alternave to the parse_ini_file() function in php. I want a simple way to store config settings, but want the flexibility to store unlimited levels of multiple arrays, special characters, etc. Any ideas?

+4  A: 

Zend_Config_Ini would fit the bill nicely for this:

$config = new Zend_Config_Ini('/path/to/config.ini', 'staging');

echo $config->database->params->host; // prints "dev.example.com"

echo $config->database->params->dbname; // prints "dbname"

Andy Baird
thanks, that looks great
Bala Clark