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?
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With