I want to show discount in percent, so I have two fields: old price and new price. Trying to show discount like this, but it returns zero:
<?php
$old = $album->price();
$new = $album->newprice();
$discount = (($new-$old)/$old)*100;
echo $discount.'%';
?>
price and newprice field type is number