Re: if variable is equal to 2 through 4

From: Date: Wed, 06 Feb 2002 21:58:57 +0000
Subject: Re: if variable is equal to 2 through 4
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-83769@lists.php.net to get a copy of this message
try: if ($variable>=2 and $variable<=4) echo "hello"; ----- Original Message ----- From: "Erik Price" <pricee@hhbrown.com> To: "Jay Fitzgerald" <jayfitz@bayou.com> Cc: "PHP (E-mail)" <php-general@lists.php.net> Sent: Wednesday, February 06, 2002 1:33 PM Subject: Re: [PHP] if variable is equal to 2 through 4 > Also, it was excessive to cross-post to different lists, especially with > this kind of question. It has nothing to do with MySQL. Cross-posting > is really only relevant for certain kinds of important announcements, > and even then probably aren't cool. > > Erik > > > On Wednesday, February 6, 2002, at 04:25 PM, Erik Price wrote: > > > > > 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 ??? > > > > ---- > > Erik Price > Web Developer Temp > Media Lab, H.H. Brown > pricee@hhbrown.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#83769) next »