Condition Checking
| From: | Ashley M. Kirchner | Date: | Wed, 19 Jul 2000 16:44:13 +0000 |
| Subject: | Condition Checking | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-7307@lists.php.net to get a copy of this message | ||
I'm trying to figure out if there's a better way to do this piece of
code:
if ($REQUEST_URI == "/test/") {
echo "Test Index";
elseif ($REQUEST_URI =="/test/index.php3") {
echo "Test Index";
}
Ideally, I'd like something like this:
if (($REQUEST_URI == "/test/") || ($REQUEST_URI ==
"/test/index.php3"))
echo "Test Index";
}
...or however other method PHP supports... I don't know if it can
be done, or not.
Some directories contain more than just a single file, and having to
check for each and everyone to figure out what to echo back will make
for a long script. Not very efficient either.
Suggestions anyone?
AMK4
--
W |
| I haven't lost my mind; it's backed up on tape somewhere.
|____________________________________________________________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ashley M. Kirchner <mailto:ashley@pcraft.com> .
303.442.6410 x130
SysAdmin / Websmith . 800.441.3873 x130
Photo Craft Laboratories, Inc. . eFax 248.671.0909
http://www.pcraft.com . 3550
Arapahoe Ave
.................. . . . . Boulder, CO 80303