parse_ini_file is used to parse a configuration file
configuration file
such as config.ini
[host]
hostname = localhost
dbname = datebase
username = root
password = root
[smatyconf]
smarty_templates_dir='templates_dir'
smarty_config_dir ='config_dir'
array parse_ini_file ( string filename [, bool process_sections ] )
reads the ini file and saves it as an array. If the proprocess_sections parameter is true, it will return an array or
more. $confarr = parse_ini_file('config.ini');
print_r($confarr);
Result:
Array(
[hostname ]= >localhost
[dbname] => datebase
[username] => root
[password] = >root
[smarty_templates_dir] => 'templates_dir'
[smarty_config_dir] => 'config_dir'
)