I am looking for an alternative to the parse_ini_file () function in php. I want an easy way to save configuration settings, but I want the flexibility of storing unlimited levels of multiple arrays, special characters, etc. Any ideas?
Zend_Config_Ini is suitable for this account:
$ 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"
$ 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"