Well you could use elseif statements so you only have to set one true instead of X amount false
eg if($includenorth){ //Do North Include }elseif($includesw){ //Do Southwest Here } the only thing is with that way, only one well get done, not all, but it depends on what you want, that may be suitable. -- Luke "Freedomware" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I now that have a system that works beautifully. I just wondered if it > could be simplififed or improved even more. > > The head section on every page consists of an included page, which I > appended below. But the most important part is the style sheet section, > which begins with two or three default style sheets (World, North > America), followed by several conditional "regional" style sheets (e.g. > the North, Southwest, Great Plains, etc.) and a few alternate style sheets: > > echo '<link href="' . $periods . 'css/aaa.css" rel="stylesheet" > type="text/css" />'; > if($includenorth == TRUE){ > echo '<link href="' . $periods . 'css' . $linkcontinent . > '/north.css" rel="stylesheet" type="text/css" />'; > } > if($includesw == TRUE){ > echo '<link href="' . $periods . 'css' . $linkcontinent . > '/southwest.css" rel="stylesheet" type="text/css" />'; > } > echo '<link href="' . $periods . 'css/themes/peace.css" rel="alternate > stylesheet" type="text/css" title="Peace" />'; > echo '<link href="' . $periods . 'css/themes/war.css" rel="alternate > stylesheet" type="text/css" title="War" />'; > > > Here's the matching head section from the main page (Alaska, in this case): > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> > <head> > <?php > $myname = 'Alaska'; > $mycode = 'ak'; > $mylink = '/ak'; > $mynickname = 'Land of the Midnight Sun'; > $mycontinent = 'North America'; > $mycountry = 'United States'; > $mystate = 'Alaska'; > $countrycode = 'us'; > $linkcontinent = '/na'; > $linkcountry = '/us'; > $linkstate = '/ak'; > $periods = '../../../../'; > $linkwebring = '/world/na/us/ak/'; > $includenorth = TRUE; > $includesouth = FALSE; > $includesouthwest = FALSE; > [Plus about a dozen more] > include ("../../../../includes/state/head.php"); > ?> > </head> > > This same head section appears on pages for the Northwest Territories > and Yukon Territory, and the style sheet all three are linked to - > north.css - features styles that modifies page elements (e.g. div#title) > that have been modified by PHP (e.g. div#titleak, div#titlenwt, > div#titleyt). > > The head section for the Southwest states accepts the southwest style > sheet and bars the northern style sheet. > > As I said, it works great. I just wondered if anyone had any suggestions > for improving it further. It would be kind of nice if I didn't have to > paste a string of FALSE statements into the head section of every page... > > $includenorth = FALSE; > $includesouth = FALSE; > $includesouthwwest = FALSE; > > Below is the entire code. Thanks! > > > > <?php > $todayDate = date("m-d-Y"); > echo '<title>Freedomware > ' . $myname . '</title>'; > echo '<meta name="description" content="' . $myname . ' versus > Microsoft" />'; > echo '<meta name="keywords" content="' . $myname . ' versus Microsoft" />'; > echo '<meta name="mssmarttagspreventparsing" content="true" />'; > echo '<meta http-equiv="content-Type" content="text/html; > charset=iso-8859-1" />'; > echo '<meta name="author" content="David Blomstrom" />'; > echo '<script src="' . $periods . 'js/swapclass.js" > type="text/javascript"></script>'; > echo '<script src="' . $periods . 'js/ss.js" > type="text/javascript"></script>'; > echo '<script language="JavaScript" type="text/JavaScript"> > <!-- > function MM_openBrWindow(theURL,winName,features) { //v2.0 > window.open(theURL,winName,features); > } > //--> > </script>'; > echo '<link href="' . $periods . 'css/aaa.css" rel="stylesheet" > type="text/css" />'; > if($includea1 == TRUE){ > echo '<link href="' . $periods . 'css' . $linkcontinent . '/a1.css" > rel="stylesheet" type="text/css" />'; > } > if($includenorth == TRUE){ > echo '<link href="' . $periods . 'css' . $linkcontinent . > '/north.css" rel="stylesheet" type="text/css" />'; > } > if($includesw == TRUE){ > echo '<link href="' . $periods . 'css' . $linkcontinent . '/sw.css" > rel="stylesheet" type="text/css" />'; > } > echo '<link href="' . $periods . 'css/themes/peace.css" rel="alternate > stylesheet" type="text/css" title="Peace" />'; > echo '<link href="' . $periods . 'css/themes/war.css" rel="alternate > stylesheet" type="text/css" title="War" />'; > ?> > > > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> > <head> > <?php > $myname = 'Alaska'; > $mycode = 'ak'; > $mylink = '/ak'; > $mynickname = 'Land of the Midnight Sun'; > $mycontinent = 'North America'; > $mycountry = 'United States'; > $mystate = 'Alaska'; > $countrycode = 'us'; > $linkcontinent = '/na'; > $linkcountry = '/us'; > $linkstate = '/ak'; > $periods = '../../../../'; > $linkwebring = '/world/na/us/ak/'; > $includea1 = TRUE; > $includenorth = TRUE; > $includequon = FALSE; > $includemar = FALSE; > $includene = FALSE; > $includemat = FALSE; > $includeapp = FALSE; > $includesouth = FALSE; > $includemw = FALSE; > $includegp = FALSE; > $includetx = FALSE; > $includerm = FALSE; > $includesw = FALSE; > $includeca = FALSE; > $includehi = FALSE; > $includemex = FALSE; > include ("../../../../includes/state/head.php"); > ?> > </head> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php