PHP code example of programie / pini

1. Go to this page and download the library: Download programie/pini library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

programie / pini example snippets


$ini = new Pini("/path/to/your/file.ini");

$ini->getValue("section name", "key name");// Returns the value of the key "key name" in section "section name"

$ini1 = new Pini("/path/to/your/first.ini");

$ini2 = new Pini("/path/to/your/second.ini");

$ini1->merge($ini2);

$ini1->merge($ini2, "section name");

$ini = new Pini();

$ini->setValue("section name", "key name", "some value");

$ini->save("/path/to/your/file.ini");

$ini = new Pini("/path/to/your/file.ini");

// ... Some other ini methods.

$ini->save();