<?php
require ( "inirw.class.php");
$ini = new iniRW ();
$ini->write ( "example.ini", "example", "testitem" , "This is an example!!!");
$ini->write ( "example.ini", "example", "testitem2", "This is an other example!!!");
$ini->write ( "example.ini", "test" , "testitem" , "TEST example");
$all = $ini->read_all ( "example.ini", "example");
print_r($all);
// $all["EXAMPLE"]["testitem"] = "This is an example!!!";
// $all["EXAMPLE"]["testitem2"] = "This is an other example!!!";
// $all["TEST"]["testitem"] = "TEST example";
$section = $ini->read_section ( "example.ini", "example"); // get section values
print_r($section);
// $section["testitem"] = "This is an example!!!";
// $section["testitem2"] = "This is an other example!!!";
$item = $ini->read_item ( "example.ini", "test", "testitem"); // get item value
echo $item;
// $item = "TEST example";
?>
|