almightyegg Posted August 8, 2007 Share Posted August 8, 2007 the leaders of groups in my game can edit the % of money donated to each fund. (3 funds in total) What I need to do is work out the percent of the money that is donated. So in one instance: fund1 = 10% fund2 = 77% fund3 = 13% And in another: fund1 = 28% fund2 = 22% fund3 = 50% is there a function that finds a specific % of a number variable? Or do I have to work out some formula, which I'm sure will en up being simple? Link to comment https://forums.phpfreaks.com/topic/63983-solved-of-a-number-variable/ Share on other sites More sharing options...
lemmin Posted August 8, 2007 Share Posted August 8, 2007 If the percent is a number (no "%" sign in it to make it a string) then you can do: ($percent/100)*($number); Link to comment https://forums.phpfreaks.com/topic/63983-solved-of-a-number-variable/#findComment-318947 Share on other sites More sharing options...
almightyegg Posted August 9, 2007 Author Share Posted August 9, 2007 I thought it's be a simple solution cheers Link to comment https://forums.phpfreaks.com/topic/63983-solved-of-a-number-variable/#findComment-318960 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.