Array no .ini How to do?

4

Hello everyone, I would like to know if the possibility of doing array in .ini

Using php to call it?

    
asked by anonymous 05.08.2015 / 20:32

1 answer

4
  

Use the parse_ini_file function to load the INI file and return the settings contained in it in an associative array.

Ini.ini

a = A
b = B
c = C

args[] = A
args[] = B
args[] = C

php

print_r( parse_ini_file( 'ini.ini' ) );

Output

Array
(
    [a] => A
    [b] => B
    [c] => C
    [args] => Array
        (
            [0] => A
            [1] => B
            [2] => C
        )

)
    
05.08.2015 / 20:48