I'm not quite sure what you're asking for here, but let me take a shot: Do you want the scripts in, say, your index.php's to know what folder they're in and act accordingly? So you'd essentially have exactly the same index.php in every folder, but they would do different things depending on if they were in /company/ or in /customer/ or in /tips/? If so, you could get the SCRIPT_NAME from the server variables, then use the dirname() function and some parsing to get the last directory name in the path. But that seems to lead to the "too many SWITCH statements" thing that you're trying to avoid. Maybe if you could clarify what you're trying to do, it might help us determine the best course of action. -TG > -----Original Message----- > From: Tony Devlin [mailto:tdevlin@xxxxxxxxxxxxx] > Sent: Monday, November 22, 2004 9:20 AM > > Onto the real question. I'm trying to make a switch > statement that switches a header file based upon > what folder you are in... > > An example: > > Let's say I have 3 folders with some files inside. > > /company/ > --> index.php > --> contact.php > > /customer/ > --> index.php > --> profile.php > > /tips/ > --> index.php > > > Basically instead of building a huge switch with EVERY full > path file name included, I want to just make a switch based > on folder, then every file inside that folder will have > the switch applied to it. I am sure this is > possible, anyone have any ideas about how to do this? > > Greatly appreciated, > > Tony Devlin > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php