I have an .ini file. This is what an .ini file looks like:
[something]
a = b
c = d
e = f
g = h
I have the following PHP code:
$ini = parse_ini_file("data.ini", true);
print_r($ini);
The output is:
Array
(
[something] => Array
(
[a] => b
[c] => d
[e] => f
[g] => h
)
)
Is there a way to 'decode' the array? For example, that the output is this:
a => b
c => d
e => f
g => h
Thanks!
$ini['something']? Looks likeparse_ini_filealso gives you the sections.Notice: Undefined index: something$ini["a"] // => "b". See a tutorial/reference, eg. oreilly.com/catalog/progphp/chapter/ch05.html , php.net/manual/en/language.types.array.php