I have all my sites/pages setup using (php) includes, as much and where ever possible. I have an include called headerinfo.inc which has meta’s, javascript, css, icons, etc. Obviously I don’t put title, description and keywords in here. So here’s what I want to happen. I would like to define the title tag in this file. I want it to look for a variable (to exist) in each independent page. The variable will be displayed in the title. I also want to concatenate the site name. I’m sure this is wrong, but this should give you an idea of what I’m thinking: <title>$titleDesc + Pre Defined Site Name</title> I guess my question(s) are: What does the code look like for the title, what does it look like on the page level and where do I put it on the page? Thanks in advance! Joe
<?php include('headerinfo.inc'); ?> <html> <head> <title><?php echo($titleDesc); ?> Pre defined site name</title> </head> ...[I]The Rest Of Your HTML Page[/I] Code (markup): That code would include your "headerinfo.inc" page and then all you have to do is put the "$titleDesc" variable in the "headerinfo.inc" file and it will display on the title for the HTML page. The <title></title> tag goes between the <head> & </head> tags as shown above. Hope this answers your question(s).
Wow, thanks so much for the quick response. That wasn't exactly what I was looking for. I'm already calling in the headerinfo.inc (<?php include('headerinfo.inc'); ?>), but I would like to include <?php echo($titleDesc); ?> Pre defined site name</title> as part of headerinfo.inc. I would like to define $titleDesc on each page. How do I define/declare that variable and where? Thanks again