Define :
In this tutorial we have to learned about PHP parse_ini_string() Function .The parse_ini_string() Function is inbuilt function in php.This function is parses a configuration (ini) string and returns the settings as an associative array.
Some reserved words used not be used as keys for ini files like null, yes, no, true, false, on, off, none. Values null, off, no and false result in "", and values on, yes and true result in "1", unless INI_SCANNER_TYPED mode is used.Characters ?{}|&~![()^" must not be used anywhere in the key and have a special meaning in the value.
parse_ini_string(ini, process_sections, scanner_mode)
Parameter | Description |
---|---|
ini | Required. Specifies the ini file to parse |
process_sections | Optional. If set to TRUE, it returns is a multidimensional array with section names and settings included. Default is FALSE |
scanner_mode |
Optional. Can be one of the following values:
|
Given below example shows how to use the parse_ini_string() function to parse a configuration (ini) string.
Output :