[PHP] Re: [PHP-DB] if variable is equal to 2 through 4

2002-02-06 Thread Mihail Bota
try this: if ($v>=2 && $v<=4) { echo "..."; } mihai On Wed, 6 Feb 2002, 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 throu

[PHP] Re: [PHP-DB] if variable is equal to 2 through 4

2002-02-06 Thread Chris Boget
> how would I write it if I wanted to say this: > if $variable == 2 through 4 ??? if(( $variable >= 2 ) && ( $variable <= 4 )) { echo "Equals 2 through 4\n"; } Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php