Home > PHP > Function > Filesystem > parse_ini_string()

parse_ini_string()

parse_ini_string - Parse a configuration string

Syntax

array parse_ini_string (string $ini, bool $process_sections, int $scanner_mode)

Arguments

  • ini - The contents of the ini file being parsed.
  • process_sections - By setting the process_sections parameter to TRUE, you get a multidimensional array, with the section names and settings included. The default for process_sections is FALSE
  • scanner_mode - Can either be INI_SCANNER_NORMAL (default) or INI_SCANNER_RAW. If INI_SCANNER_RAW is supplied, then option values will not be parsed.

Description

parse_ini_string() returns the settings in string ini in an associative array.

Version

PHP 5.3.0

Return value

The settings are returned as an associative array on success, and FALSE on failure.