parse_ini_file

array parse_ini_file(string filename, [bool process_sections]) 

Reads and parses an ini file.

Returns:

Array of ini file values

Description:

Opens and processes an initialization file. The file format should be the standard Windows format as seen in the PHP initialization file. By default, all entries are returned in an associative array with the setting name as the key and its current setting as the value.

If process_sections is set, parse_ini_file() returns a multidimensional array with each section of the initialization file in the first level and entries in each section contained in the nested arrays.

One useful feature of this function is that you can use it to parse your own custom initialization files, provided that they’re ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.