With an .ini file lie this:
[sectionName1]
key1=val1
key2=val2
[sectionName2]
key1=val1
key2=val2
[sectionName3]
key1=val1
key2=val2
...how can the section sectionName2
and everything it contains be removed?
Parsing the whole file as text is one way, but since PHP has parse_ini_file
, it seems like there would be a built-in function for something like this. The parse_ini_file
documentation does not address any special way to alter ini files.