This shows you the differences between two versions of the page.
uphp:functions:ini_get_array [2017/04/13 13:29] jeff |
uphp:functions:ini_get_array [2021/09/13 05:57] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======ini_get_array====== | ||
- | |||
- | < | ||
- | |||
- | Get a group of parameters from an INI file as an < | ||
- | |||
- | ====Description==== | ||
- | |||
- | <well size=" | ||
- | < | ||
- | <span style=" | ||
- | <span style=" | ||
- | </ | ||
- | [[ini_get_array]] ( | ||
- | < | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | </ | ||
- | </ | ||
- | |||
- | This function reads multiple configuration key/value pairs from an INI file. | ||
- | |||
- | ====Parameters==== | ||
- | |||
- | < | ||
- | |||
- | < | ||
- | |||
- | ====Return Values==== | ||
- | |||
- | < | ||
- | |||
- | < | ||
- | |||
- | <alert type=" | ||
- | |||
- | ====Example==== | ||
- | |||
- | Given that the file / | ||
- | |||
- | < | ||
- | [settings] | ||
- | name=John | ||
- | age=33 | ||
- | </ | ||
- | |||
- | ... this code will read the entire INI file into $arr and display the contents: | ||
- | |||
- | <code php> | ||
- | < | ||
- | $arr=ini_get_array("/ | ||
- | print_r($arr); | ||
- | ?></ | ||
- | </ | ||
- | |||
- | ... 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 < | ||
- | |||
- | [[ini_set()]] - Set a value in an INI file | ||