```
$result_id[][] = "";
$result_total[][] = "";
foreach ($user as $key) {
    $a = 0;
    foreach ($drama as $row) {
        if ($w_average[$key['userid']][$row['id']] > 0) {
            if ($w_average[$key['userid']][$row['id']] < 1) {
                $result_id[$key['userid']][$a] = $row['id'];
                $result_total[$key['userid']][$a] = $w_average[$key['userid']][$row['id']];
                $a++;
            }
        }
    }
}

```

i wanna get the positive value of w\_average and the nearest value to 1.

the w\_average are 0.25 and 0.33 but the output of my source code is 0.25

how to fix it? thanks