I am trying to remove items from my array to make a new array with only items in it that have a value greater than 0. I tried stuff with the foreach loop, looked it up on internet, but nothing worked.
Here is my array
$productarray = array(
'a' => 6,
'b' => 0,
'c' => 2,
'd' => 1,
'e' => 3,
'f' => 4,
);
expected output:
'a' => 6,
'c' => 2,
'd' => 1,
'e' => 3,
'f' => 4,
Thanks in advance!