i have data in array
[list] => Array
(
[0] => Array
(
[id] => 216
[name] => item A
[nilai] => 0.456
)
[1] => Array
(
[id] => 217
[name] => item B
[nilai] => 0.999
)
)
here I want to make a condition if the value is the largest then the text is green how to make the condition in foreach ?
this my code
<?php foreach($res['method']['list'] as $key=>$row) { ?>
<div class="form-check">
<input class="form-check-input" type="radio" name="flexRadioDefault" id="flexRadioDefault1">
<label class="form-check-label" for="flexRadioDefault1"><?php echo $row['nilai'] ?></label>
</div>
<?php } ?>