Canman2005 Posted June 8, 2006 Share Posted June 8, 2006 Hello everyoneI have a php page which prints two number values, one of the numbers is a percentage and the other is a total amount. It looks like;Percentage: 22Total: 500Can PHP work out percentages? So my example would be22% of 550and then print out the toal on the page with the percentage deducted from the total? Tried a few ideas but cannot seem to get it to workAny help would be aceThanks in advanceMark Link to comment https://forums.phpfreaks.com/topic/11464-php-maths-help/ Share on other sites More sharing options...
samshel Posted June 8, 2006 Share Posted June 8, 2006 $percentage = 22;$total = 550;echo $percentage."% of ".$total." is ".($total * $percentage/100 ); Link to comment https://forums.phpfreaks.com/topic/11464-php-maths-help/#findComment-43075 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.