The array_replace_recursive()
function looks to be what you need.
$a = array("59745506" => array("up" => 0,));
$b = array("59745506" => array("text" => "jfrj"));
$c = array_replace_recursive($a, $b);
var_export($c);
// array (
// 59745506 =>
// array (
// 'up' => 0,
// 'text' => 'jfrj',
// ),
// )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With