I have one master array and multi slave arrays and i need function that replace values on same array keys.
example:
master array:
$master = array(**"a"=>"master a"**,**"b"=>"master b"** "c"=>"master c");
slave arrays:
$slave_a = array("s1"=>array(**"a"=>"slave a"**,"f"=>"slave f"));
$slave_b = array("s2"=>"slave" **"b"="slave b"**);
I need function to filter slave arrays to look like:
$slave_a to be array("s1"=>array(**"a"=>"master a"**,"f"=>"slave f"));
$slave_b to be array("s2"=>"slave" **"b"="master b"**);
Тhanks in advance and sorry for my poor English
OK, so after parsing the ini files using
parse_ini_fileYou should end up with arrays similar to this (when using process sections TRUE):Then You can use this simple function (not tested):
But I am really not sure whether this will work, maybe it will need some slight modifications…
Also You will have to call this function so many times as many slave arrays You have, or in other words, You will have to call this function for each slave array.
This should work for any sub-array level, even it would be [ [ [ [ [ [][][][] ] ] ] ] ].