How to remove empty values from multidimensional array in PHP?
I've been looking a lot of answers, but none of them are working for me. This is the data assigned to my $quantities array: Array( [10] => Array([25.00] => 1) [9] => Array([30.00] => 3) [8] => Array([30.00] => 4) [12] => Array([35.00] => ) [1] => Array([30.00] => ) [2] => Array([30.00] => ) ) I'm looking for a way to remove the subarrays with empty values like [12] [1] and [2] while keeping everything else. The desired result: Array( [10] => Array([25.00] => 1) [9] => Array([30.00] => 3) [8] => Array([30.00] => 4) ) I tried a lot of the functions on the official php docs and none of them