ini_put_array

(FW >= 1.0)

ini_put_array - set a group of parameters in an ini file from an array

Description

ini_put_array(string filename, array $data, [string section])
Write multiple configuration key/value pairs to an INI file.  If the $section variable is blank, the array will allow two dimensional arrays, where the first dimension is the section and the second dimension is the key/value pair.  If the section is specified, a single dimension will be used.

Parameters

$filename

full path and filename of ini file.

data

array of key value elements to write

section

optional section to use

Return Value

none

Examples

<? 
$arr=array();
$arr['name']='John';
$arr['age']=33;
ini_put_array("/data.ini",$arr,"settings");
/* INI file will contain this:
[settings]
name=John
age=33
*/
?>
<? 
$arr=array();
$arr['data']=array();
$arr['data']['name']='John';
$arr['data']['age']=33;
ini_put_array("/data.ini",$arr);
/* INI file will contain this:
[data]
name=John
age=33
*/
?>