I've been trying to remove a key from my config! Example: I want to remove "Mojang" from this config: PHP: Microsoft: Mojang: Bugs: 1230 Employees: 69 Minecraft: Bugs: 200000 Ceo: minijaham My previous attempt: PHP: foreach ($data->get("Microsoft") as $val => $key) { $name = array_search($val, $data->get("Microsoft")); var_dump($name); // Outputs Mojang and Minecraft (string) unset($data->get("Microsoft")[$name]); // bool(false) ???? wtf}$data->save(); I know I'm doing something incorrectly, as I've done this before. But I can't quite figure out what I am doing wrong!
try PHP: $all = $data->get("Microsoft");unset($all["Mojang"]);$data->set("Microsoft", $all);$data->save();
Now that I think about it, I think I forgot to set the unsetted values. I feel so dumb! I'll try it and come back with a result Thank you!