An algorithm for php array operation

<?php
$data = [
    "a" => [
        "b" => 1,
        "c" => 2,
        "d" => [
            "e" => 3,
            "f" => 4
        ]
    ]
];
$temp1 = change($data, "a.b");
$temp2 = change($data, "a.d.f");
?>
change100

change($data, "a.d.f")

$data["a"]["d"]["f"] = $data["a"]["d"]["f"] + 100;

1.
2.change2"a.b.c.d.e.f.g.h.i.j.k"change
3.
4.
Php
Jun.11,2021

function change($data, $path) {
    return array_reduce(explode('.', $path), function($result, $item) {
        return $result[$item];
    }, $data) + 100;
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e47676-44c27.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e47676-44c27.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?