I'm sort of new to PHP; here's my question: Is there a way I can say "if $variable == "entiredir.."? Here's a small piece of my code to better explain: <?php $theuri = $_SERVER['REQUEST_URI']; if ( ($theuri =="/gr/gamecube..") or ($theuri =="/gr/gc.php") ) { $itemis = "gc"; } else { $itemis = ""; } ?> PHP: Notice the part that says "/gr/gamecube..". I want this to mean that ALL files beyond this URL will apply the same function. So, pages with /gr/gamecube/weee.php, /gr/gamecube/beyond/yay.php, gr/gamecube/beyond/beyond/ooo.php would ALL apply the same function. Is this possible with PHP, and if so, how? It'd be much more convienant than listing every single page...
This should work: <?php $theuri = $_SERVER['REQUEST_URI']; if ( eregi('/gr/gamecube', $theuri) || eregi('/gr/gc.php', $theuri)) $itemis = "gc"; else $itemis = ""; ?> PHP: -the mole