Display the drop-down list

parse_ini_string()

« pack | parse_str »
<?php
$array 
parse_ini_string (
    
// string $ini
    
?// [bool $process_sections = false]
    
?  // [int $scanner_mode = INI_SCANNER_NORMAL]
);
?>
Result
$array = [
  
'first_section' => [
    
'one' => '1',
    
'five' => '5',
    
'animal' => 'BIRD',
  ],
  
'second_section' => [
    
'path' => '/usr/local/bin',
    
'URL' => 'http://www.example.com/~username',
  ],
  
'third_section' => [
    
'phpversion' => [
      
=> '5.0',
      
=> '5.1',
      
=> '5.2',
      
=> '5.3',
    ],
  ],
]
Examples
#1 parse_ini_string  ("[first_section] one = 1 five = 5 animal = BIRD [second_section] path = \"/usr/local/bin\" URL = \"http://www.example.com/~username\" [third_section] phpversion[] = \"5.0\" phpversion[] = \"5.1\" phpversion[] = \"5.2\" phpversion[] = \"5.3\"")
#2 parse_ini_string  ("[first_section] one = 1 five = 5 animal = BIRD [second_section] path = \"/usr/local/bin\" URL = \"http://www.example.com/~username\" [third_section] phpversion[] = \"5.0\" phpversion[] = \"5.1\" phpversion[] = \"5.2\" phpversion[] = \"5.3\"",
 
true)