I have two set numbers
$score1 = 20 $score2 = 5
I want to find out the difference.. ie: 15
How would I do this??
Try this
<?php $score1 = 5; $score2 = 20 ; $diff = ($score1 - $score2); if ($diff < 0) { $diff = ($diff * (-1));} Print $diff; ?>
Kevin
[man]abs[/man]. I leave you to figure out how to do subtraction.
lol 🙂