[posted and mailed] Jim Lucas addressed php.general and spake thusly:
>> I have a page that includes a file in the middle, but I wish to set >> the title of the page based on a variable set in the included file-- >> is this possible? >> >> Basically, I was doing this for the output buffering: >> *** >> function fixtitle($buffer) { return (str_replace("XXX", $pagetitle, >> $buffer)); >> } >> >> ob_start("fixtitle"); >> >> ?> >> <html> >> <title>XXX</title> >> >> ... >> >> <? include("file_that_sets_pagetitle.inc") ?> >> >> ... >> >> >> <?php >> >> ob_end_flush(); >> >> ?> > try it the other way around. capture the output of the included file > before you send/display the title I'm confused about how this would work. Could you clarify a little? My understanding was that the callback function was called just before the buffer was flushed. So, in this case it should get the $pagetitle from the included file and apply it... but it doesn't appear to do this. I'm unclear how to do this the other way around. Thanks! c -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]