Hi. I'm hoping you folks can help me with a function problem I have.
Take a look at the following code:
?
?php
function fill_page($title) {
?
html
head
title?php echo $title; ?/title
?php
}
?
I have a page divided into 3 sections. A header include, the content,
and a footer include.
I have a function (fill_page) that lives in the header include that has
it's variable defined in the content page. As you can see, the function
above will fill $title with whatever is defined in the content page.
i.e. fill_page(This is the title)
What I want to do is use that $title variable *outside the function, a
little further down the page. I've played around with the ampersand
before the dollar sign, and using a global variable, all with no success.
It seems to me that this should be simple, and I think I'm
overcomplicating it. Here's what I'm trying to do:
1. Get a string of text from the individual content pages.
2. Use that string in the Title of the html page
3. Use the same string as the header of the content page.
I'm sorry I'm being stupid about it...but I've made it harder than it
probably is.
Please respond to [EMAIL PROTECTED] as I am on the digest.
Thanks in advance.
mto
Michael O'Neal
Web Producer/ Autocrosser
ST 28 '89 Civic Si
-
M A N G O
B O U L D E R
-
http://www.thinkmango.com
[EMAIL PROTECTED]
p-303.442.1821
f-303.938.8507
--
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]