Dethman Posted July 12, 2008 Share Posted July 12, 2008 Hey guys I am trying to get an if statment to this.... <?php if($var1*$var2 is 120% higher than of $var3*$var4){ do this } Is there a code for that if there is can someone help me out? Thank You, Brian Flores, CEO NimbusGames,llc Quote Link to comment Share on other sites More sharing options...
Jeigh Posted July 12, 2008 Share Posted July 12, 2008 <?php $var5 = $var3*$var4; $finalvar = $var5*1.20; $var = $var1*$var2; if($var == $finalvar) { //PHP CODE } and of course if you want 120% and greater just use > rather than ==. There is probably an easier way to do it than this and I'm not entirely sure that multiplying it by the decimal will work (3:30AM now anyway, my thinking is a little off). Quote Link to comment Share on other sites More sharing options...
Dethman Posted July 12, 2008 Author Share Posted July 12, 2008 Yeah thanx I havnt slept in two days and I have to get this project done I seem to forget the smaller things when I havnt slept in along time :-\ Well thanx a million! 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.