jwilson122 Posted February 4, 2011 Share Posted February 4, 2011 Hey, I have a question about doing a % in PHP.. So say a user in my database has a cash amount of $20.00. Their referrer is going to get 20% of that. How would I calculate that in PHP? Link to comment https://forums.phpfreaks.com/topic/226711-percent/ Share on other sites More sharing options...
drisate Posted February 4, 2011 Share Posted February 4, 2011 $ref_amt = $member_amt / 100 * 20; Link to comment https://forums.phpfreaks.com/topic/226711-percent/#findComment-1169970 Share on other sites More sharing options...
Pikachu2000 Posted February 4, 2011 Share Posted February 4, 2011 20% would be amount * .2 Link to comment https://forums.phpfreaks.com/topic/226711-percent/#findComment-1169971 Share on other sites More sharing options...
jwilson122 Posted February 4, 2011 Author Share Posted February 4, 2011 Thanks guys! Link to comment https://forums.phpfreaks.com/topic/226711-percent/#findComment-1169993 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.