On Fri, March 23, 2007 5:47 am, Ross wrote: > I am using a script to generate a sitemap. It displays the page names > (mypage.php) but I want it to display the titles. The page heads and > <title> > are generated dynamically so the line below does not work > > if(preg_match("'<title>(.+)</title>'i", $f, $matches)){ > > However all the paged titles are stored in a variable $pageTitle. On > every > page like this > > $pageTitle="Who We Are"; > > how can I retrieve this variable? I tried > > echo $pageTitle and $_GET['pageTitle']
I'm confused... In your sitemap script, are you scraping your own site? The preg_match should work. but you could punt and use strpos since you know exactly what case/attributes are on your own TITLE tags. Or are you trying to have the page output update the sitemap on every page view? Or...??? -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php