rareness Posted May 3, 2008 Share Posted May 3, 2008 Hi guys im trying to calculate two thirds of a value ive tried a few things but im not sure how i could go about this any advice? Quote Link to comment Share on other sites More sharing options...
Coreye Posted May 3, 2008 Share Posted May 3, 2008 Try: <?php $value = 2; $multiple = (100 / 3) * 2; $result = $value * $multiply; echo $result; ?> . Quote Link to comment Share on other sites More sharing options...
Coreye Posted May 3, 2008 Share Posted May 3, 2008 Oops, nevermind. Try this: <?php $value = 2; $multiply = (100 / 3) * 2; $result = $value * $multiply; echo $result; ?> Quote Link to comment Share on other sites More sharing options...
rareness Posted May 3, 2008 Author Share Posted May 3, 2008 Got it to work in the end echo "To Share Exp with a level ".$_POST['txtuserlvl']." the required level is : "; $value = $_POST['txtuserlvl']; $multiply = (100 / 3) * 2 /100; $result = $value * $multiply; echo round($result); Thanks alot Coreye you set me on the right path Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted May 3, 2008 Share Posted May 3, 2008 (100 / 3) * 2 /100 I want you to think long and hard about what that simplifies to mathematically. Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted May 3, 2008 Share Posted May 3, 2008 (100 / 3) * 2 /100 I want you to think long and hard about what that simplifies to mathematically. LOL Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.