$row = mysql_fetch_array($result) or die(mysql_error()); // Echo some results echo $row[0];
simple addition/subtraction?
Started by asdpyro, Dec 09 2008 09:26 AM
2 replies to this topic
#1
Posted 09 December 2008 - 09:26 AM
What I want to do is make the output from this code be 200-"output" so that if the out put is 10 what is seen on page is 190.
|
|
|
#2
Guest_Jordan_*
Posted 09 December 2008 - 10:05 AM
Guest_Jordan_*
// Echo some results echo (200-$row[0]);
Or you can assign the output to a variable and substract:
// Echo some results $output = $row[0]; $subtractionValue = 200 - $output; echo $subtractionValue;
#3
Posted 09 December 2008 - 10:24 AM
ah ok, that must be what i was doing wrong, php is new to me, thanks tho. Its been very helpfull knowing about this site


Sign In
Create Account


Back to top









