Re: Matching numbers 1-100

From: Date: Sat, 03 Feb 2007 17:58:19 +0000
Subject: Re: Matching numbers 1-100
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-248244@lists.php.net to get a copy of this message
At 5:09 PM +0000 2/3/07, Wikus Moller wrote:
Hi. I want to know if anyone can help me with my code which matches a number to a range e.g. 1-15 and echoes an image if the number is in the range. The code would use the if statement and check if a variable for example 5 matches the range like 4-10 and if it does it echoes a certain image. Anyone know which function I should use and what regex I should use? Thanks
Hi: Wasn't this same question just asked by Chilling Lounge Admin? It does seem that similar questions rise at similar times, must be sun spots. In any event, its the same answer -- use a switch. http://us2.php.net/switch hth's tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#248244) next »