- round: documentation ( source)
<?php
$a='26.15';
$b='1.00';
if ($a && $b) {
$discount = @round($promotion_temp * 10 / $price_temp, 2);
if(empty($discount))$discount='';
$discount = "" . $discount;
echo $discount;
}else{
echo 'fail';
}