Created
April 27, 2017 13:55
-
-
Save FSahinn/16e3f762876310009dfbd2100b437432 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
$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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment