"php: remove element from multidimensional array (by key) using foreach" Code Answer

5

easy way!? you can do this just with one foreach!

foreach ($data as $key => $subArr) {
    unset($subArr['1']);
    $data[$key] = $subArr;  
}
By aetrnm on October 13 2022

Answers related to “php: remove element from multidimensional array (by key) using foreach”

Only authorized users can answer the search term. Please sign in first, or register a free account.