<table>
<thead>
<tr>
<th>model</th>
<th>a</th>
<th>jumlah</th>
</tr>
</thead>
<?php foreach((array)$query as $row):
if ($row->model='10') {
$jumlah=$row->a-10;
}else{
$jumlah=$row->a-5;
};?>
<td><?php echo $row->model ?></td>
<td><?php echo $row->a ?></td>
<td><?php echo $jumlah ?></td>
it should result like this
but why is the result like this?
why data in coloumn model overide to 10? how to solve that?