======ini_get_array====== WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0 Get a group of parameters from an INI file as an array ====Description==== array ini_get_array ( string $filename [, string $section ] ) This function reads multiple configuration key/value pairs from an INI file. ====Parameters==== $filename: Full path and name of the INI file $section: Optional, name of the section inside the INI file ====Return Values==== If a section is specified: a single-dimensional array, with all key/value pairs in the section. If a section is not specified: a two-dimensional array __containing the entire INI file__. The first dimension will contain the sections and the second the key/value pairs. Loading an entire INI file can be memory intensive and should be avoided if the file has more than just a few elements. Instead, use [[ini_get]] to load specific values, which works well with large files. Or for fast access consider using NVRAM to store a large collection of data. ====Example==== Given that the file /ini_get_array_example.ini contains: [settings] name=John age=33 ... this code will read the entire INI file into $arr and display the contents:
... and the output will be: [$arr] = Array ( [settings] = Array ( (string) [name] => John (int) [age] => 33 ) ) ====See Also==== [[ini_get()]] - Get a value from an INI file [[ini_put_array()]] - Write a group of parameters to an INI file from an array [[ini_set()]] - Set a value in an INI file