Array no . ini How to do?

Asked

Viewed 198 times

4

Hello folks I would like to know if to the possibility of array in . ini

Using php to call it ?

  • I was going to answer your question, but I think you better read this first friend: http://meta.pt.stackoverflow.com/q/4067/3635

  • This is a new one, the guys throwing the iron and I don’t even know anything !

  • 3

    Edward I sent you several messages and you ignored them all, don’t take it personally, but you’re ignoring the right use of the site. I guided you several times and you did not answer me and did not use the site correctly, only after that I opened that post in META and I sent 3 times the link to you. You didn’t read it because you didn’t want to. Please note the good use of the site from now on and if you have any questions about how to use it you can ask me. Thank you for understanding.

  • 1

    No one 'put the iron'! There was communication by the comments, but you ignored them.

  • I’m really sorry about what happened I just come in to ask, but I’ll start organizing ok #Guilherme, I’ll see about it, understand I understood more right, could have sent me the link to follow !

  • @Edwardjunior How could I have sent you the link? I sent you 3 times. Even Vitor sent you the link, see: http://answall.com/questions/45151/como-esconder-iframe-quando-entrar-no-site#comment148630_45157 (this was on 14/02)

Show 1 more comment

1 answer

4

Use the function parse_ini_file to load the INI file and returns 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
        )

)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.