trying to transfer one array with a combination of positive and negative numbers to a new array- but only where the elements are positive.
This is what I have so far:
$param = array(-1,2-,3,1,2,4,-1337); function positive_function($arr) { $temp = array(); foreach ($arr as &$value) { if($value > 0) { $temp[] = $value } } return $temp; }