INI Files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • patkay_156@yahoo.co.uk

    INI Files

    Hi,

    I've been using the very convenient function parse_ini_file( ) to read
    an ini file into a 2d array as follows:

    $ini_array = parse_ini_file( "sample.ini ", true);

    Say I modify the contents of this array and I want to write it back to
    the original file. What is the best way to do this?

    Thanks for any help.

  • Alekc

    #2
    Re: INI Files

    > Say I modify the contents of this array and I want to write it back to[color=blue]
    > the original file. What is the best way to do this?[/color]

    call textbox with names like sectionname[key]
    after that do some simple foreach and write manualy file contents

    Comment

    • Chung Leong

      #3
      Re: INI Files

      Unfortunately there isn't a built-in function for writing back to a INI
      file. I am sure there are plenty of solutions in the user-contributed
      note section in the PHP manual though. Writing your function wouldn't
      be hard either, if the parameter/value pairs are not arbituary.

      Comment

      Working...