monkeybidz Posted March 6, 2008 Share Posted March 6, 2008 I need to get a defined percentage by using some math whith the vars. In the example below, I would need to get 5% of 1,000.00. <?php $BASEAMOUNT = "1000.00"; $BUYER_PERCENTAGE = "5.0000";//<-- 5%. This Var can be changed in database, so I need to use vars instead of numbers. ?> $FEEBUY = "Math Problem Here"; Link to comment https://forums.phpfreaks.com/topic/94631-quick-percentage-problem/ Share on other sites More sharing options...
schilly Posted March 6, 2008 Share Posted March 6, 2008 $FEEBUY = $BASEMOUNT * $BUYER_PERCENTAGE / 100; Link to comment https://forums.phpfreaks.com/topic/94631-quick-percentage-problem/#findComment-484553 Share on other sites More sharing options...
monkeybidz Posted March 6, 2008 Author Share Posted March 6, 2008 Will try it. Thanks! Link to comment https://forums.phpfreaks.com/topic/94631-quick-percentage-problem/#findComment-484554 Share on other sites More sharing options...
keeB Posted March 6, 2008 Share Posted March 6, 2008 Someone didn't pass highschool math Link to comment https://forums.phpfreaks.com/topic/94631-quick-percentage-problem/#findComment-484578 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.