Finding if a number is in the range
| From: | Joseph Blythe | Date: | Fri, 18 May 2001 01:42:23 +0000 |
| Subject: | Finding if a number is in the range | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-53364@lists.php.net to get a copy of this message | ||
hello,
How do I find if a number is in a range example:
0200-0299
1000-2263
2264-2499
Lets say I choose 203 how would find which number range it was in?
I was sort of thinking of using arrays of all the number ranges and using the in_array function to find which range the numbers are in, but this would take some time as there are around 3000+ numbers.
I do however have all the numbers in a database already but they are not categorized in ranges.
A better way?
Thanks
Joseph