Nested arrays in ini file
php
Solution
INI files are pretty limited and parse_ini_file is far from perfect. If you have requirements like this, you should better look for some other syntax.
What about JSON? It's support in PHP comes with almost same comfort:
$data = json_decode(file_get_contents($filename), TRUE);
file_put_contents($filename, json_encode($data));
Problem
I am trying to have a nested array structure inside an ini settings file. The structure i have is: ``` stuct1[123][a] = "1" stuct1[123][b] = "2" stuct1[123][c] = "3" stuct1[123][d] = "4" ``` But this doesnt work. Can anyone explain if this type of structure is possible with `parse_ini_file` If it is possible, what am i doing wrong?