// Source
Array
(
[name] => ben
[country] => ca
[msg] => Array
(
[type] => mail
[read] => 0
[content] => hello world
)
)
// Change
Array
(
[msg] => Array
(
[read] => 1
)
)
// Result
Array
(
[name] => ben
[country] => ca
[msg] => Array
(
[type] => mail
[read] => 1
[content] => hello world
)
)
$result = php_function($source,$change);
What php function allows this kind of transformation?
$source['msg']['read'] = 1;? Is$changethe new value ofread? or is it the field to change? If it's the field does it always get set to1? Will it always be withingmessage? Need some clarity here.