On Wednesday, February 6, 2002, at 04:10  PM, Jay Fitzgerald wrote:

> i am currently using this code:
>
> if ($variable == 2) || ($variable == 3) || ($variable == 4)
> {
> echo "hello";
> }
>
> how would I write it if I wanted to say this:
>
> if $variable == 2 through 4 ???

if ($variable >= 2) && ($variable <= 4)


----

Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to