RE: [PHP-DB] if variable is equal to 2 through 4
| From: | Gurhan Ozen | Date: | Thu, 07 Feb 2002 00:20:09 +0000 |
| Subject: | RE: [PHP-DB] if variable is equal to 2 through 4 | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-16590@lists.php.net to get a copy of this message | ||
if ( ($variable > 1 ) && ($variable < 5) )
echo "hello";
or alternatively,
for ($i=2; $i < 5; $i++)
{
if ($variable=$i)
echo "hello";
}
Gurhan Ozen
MCI WorldCom
Quality Assurance Team
c-gurhan.ozen@wcom.com
ph: 703-449-4754
Vnet: 228-4754
1-800-PAGE-MCI pin: 1927052
AIM: Greywolf1923
-----Original Message-----
From: Jay Fitzgerald [mailto:jayfitz@bayou.com]
Sent: Wednesday, February 06, 2002 4:10 PM
To: php-general@lists.php.net; mysql@lists.mysql.com;
php-db@lists.php.net
Subject: [PHP-DB] if variable is equal to 2 through 4
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 ???
Should you have any questions, comments or concerns, feel free to call me
at 318-338-2034.
Thank you for your time,
Jay Fitzgerald, Design Director - CSBW-A, CPW-A, CWD-A, CEMS-A
==========================================================
Bayou Internet..............(888)
30-BAYOU........................http://www.bayou.com
Mississippi Internet.......(800)
MISSISSIPPI...............http://www.mississippi.net
Vicksburg Online..........(800)
MISSISSIPPI................http://www.vicksburg.com
==========================================================
Tel: (318) 338-2034 ICQ: 38823829 Fax:
(318) 323-5053
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php