Answers for "Arr::forget() The Arr::forget method removes a given key / value pair from a deeply nested array using "dot" notation:"

0

Arr::forget() The Arr::forget method removes a given key / value pair from a deeply nested array using "dot" notation:

use Illuminate\Support\Arr;

$array = ['products' => ['desk' => ['price' => 100]]];

Arr::forget($array, 'products.desk');

// ['products' => []]
Posted by: Guest on August-20-2021

Code answers related to "Arr::forget() The Arr::forget method removes a given key / value pair from a deeply nested array using "dot" notation:"

Browse Popular Code Answers by Language