Yes, I corrected this problem. Now, the URL of each page is being displayed as the title. We are making progress! Now I just need to figure out why the URLs are shown as the title, and not whaty I want to be shown. Austin Caudill --- On Fri, 6/12/09, David Robley <david@xxxxxxxxxxxxx> wrote: From: David Robley <david@xxxxxxxxxxxxx> Subject: Re: Re: Dynamic Titles To: php-general@xxxxxxxxxxxxx Date: Friday, June 12, 2009, 9:29 PM On Sat, 13 Jun 2009, you wrote: > Well, im no longer getting any errors now, but its still not working. > You can see it here: http://www.newtuts.com. When you go there, it > should say "Photoshop tutorials, Flash tutorials . . .". This should be > the default page. When you click on "Support", the title should become > "Newtuts Help". But instead, it just says "echo $title". Any more > ideas? > > > > Austin Caudill > > --- On Fri, 6/12/09, David Robley <robleyd@xxxxxxxxxxx> wrote: > > > From: David Robley <robleyd@xxxxxxxxxxx> > Subject: Re: Dynamic Titles > To: php-general@xxxxxxxxxxxxx > Date: Friday, June 12, 2009, 3:34 AM > > Austin Caudill wrote: > > Hello, im trying to make the CMS system im using more SEO friendly by > > giving each page it's own title. Right now, the system assigns all > > pages the same general title. I would like to use PHP to discertain > > which page is being viewed and in turn, which title should be used. > > > > I have put in the title tags the variable "$title". As for the PHP im > > using, I scripted the following: > > > > $url = "http://'.$_SERVER['SERVER_NAME']''.$_SERVER['REQUEST_URI']'"; > > switch ( $url ) > > { > > default: > > $title = "Photoshop tutorials, Flash tutorials, and more! Newtuts > > Tutorial Search"; break; > > > > case "$config[HTTP_SERVER]help.php" : > > $title = "Newtuts Help"; > > break; > > } > > > > Right now, im getting this error: > > Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, > > expecting T_STRING or T_VARIABLE or T_NUM_STRING in > > /home/a7201901/public_html/includes/classes/tutorial.php on line 803 > > > > Can someone please help me with this? > > > > > > > > Thanks! > > I'm guessing that line 803 is > > $url = "http://'.$_SERVER['SERVER_NAME']''.$_SERVER['REQUEST_URI']'"; > > which is full of mismatched quotes :-) Try any of > > $url = "http://{$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}"; > $url = "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; > $url = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; > > Cheers Forwarding to the list for the benefit of others. As you haven't shown the code that is supposed to produce the title, we're back to guessing again. Looking at the source of your Support page, I see the the Title tags are empty. If you are seeing echo $title is it possible you forgot to use php tags around the php code? Cheers -- David Robley "I haven't had any tooth decay yet," said Tom precariously. Today is Prickle-Prickle, the 18th day of Confusion in the YOLD 3175. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php