$xs_zb=array(6.7,3,5.5,13.3,7.1,22.5,7,9.3,5.3,19.2,1.1); foreach($xs_zb as $tqq) { $tt+=$tqq; echo $tqq."====> ".$tt." <br> "; } $tt = round($tt,2); if($tt==100.00){ echo ("output"); }