Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- $tUp: Beğenenler
- $tDown: Beğenmeyenler
- $tTotal: Beğenen ve Beğenmeyenler Toplamı
- $percentageCalculate: Beğenenlerin yüzde hesaplaması. Ör: % 75 Kişi Beğenmiş
- */
- $tUp = 50;
- $tDown = 90;
- $tTotal= $tUp + $tDown;
- $percentageCalculate = ($tUp*100) / $tTotal;
- echo number_format($percentageCalculate, 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement