Comparing 3 Numeric Values
Posted: Tue Jul 01, 2008 12:01 am
Is there any way to use PHP to compare 3 numbers and check that they are within a certain range? I'm sure I could do some very lengthy if statements to compare, but if there's a way to just use an array or something else clever, advice would be great.
For example, if I'd want the numbers to all be within 10 of each other, and I had the numbers 39, 41, and 44... I'm not sure how to explain without using code, but hopefully the first little paragraph will be helpful enough to explain stuff.
For example, if I'd want the numbers to all be within 10 of each other, and I had the numbers 39, 41, and 44... I'm not sure how to explain without using code, but hopefully the first little paragraph will be helpful enough to explain stuff.