Here is the code
<td>RM<?php echo number_format($fetch_cart['price']); ?>/-</td>
<td>
<form action="" method="post">
<input type="hidden" name="update_quantity_id" value="<?php echo $fetch_cart['id']; ?>" >
<div class="num">
<input type="number" name="update_quantity" min="1" value="<?php echo $fetch_cart['quantity']; ?>" >
</div>
<input type="submit" value="update" name="update_update_btn">
</form>
</td>
<td>RM<?php echo $sub_total = number_format($fetch_cart['price'] * $fetch_cart['quantity'],2); ?>/-</td>
<td><a href="cart.php?remove=<?php echo $fetch_cart['id']; ?>" onclick="return confirm('remove item from cart?')" class="delete-btn"> <i class="fas fa-trash"></i> remove</a></td>
</tr>
<?php
$grand_total .= $sub_total;
};
};
?>
</tbody>
i tried formating but its not working but there is a error showing saying non-numeric value at
<?php
$grand_total .= $sub_total;
};
is there a solution fr this problem ive searched google many time but not working