Name in the <title> tag

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
sulen
Forum Commoner
Posts: 79
Joined: Wed Jul 09, 2003 4:55 pm
Location: los angeles
Contact:

Name in the <title> tag

Post by sulen »

I need to be able to get the name of the web page enclosed within the <title> tags. I cannot use strip_tags because that would require me to assign the code to a variable which I cannot do. For eg

<html>
<head>
<title> test page </title>
</head>
<body>
blah blah blah ...........
</body>
</html>

I need to be able to get the string "test page" between the title tags and assign it to a php variable for display. Any suggestion will be greatly appreciated

Thx in advance
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

Post Reply