Re: [PHP] Re: function? variable?
I'm sure i confused someone... The $pagetitle1 and $pagetitle are supposed to be the same... I made a couple typos -- Jason Whitaker "Jason Whitaker" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... : OK,... : : For each page on my site there will be a different title. : : Example: : : : ?> : : : or : : : : ?> : : : What I want to know how to take the word that is currently in the place of : "News" or "home".. Wait.. I think I may have figured it out... : : What if I set a variable in the body of the page that looks like this: : : $pagetitle1 = "Home" : : //Changeing the word "Home" with the title of what ever page the User is on. : //EI: Users on the Homepage, variable is set to Home, or user is on News : //page, variable is set to News. : //Where as the code would look like this if the user was on the News page. : : $pagetitle = "News" : : Then I use the variable($pagetitle) in the title pags, like so: : : : : : ?> : : : And that way I can use that same variable anywhere else in the page. : : And when I edit the code and need to change the page title I change it where : I set the variable. EI: : : $pagetitle1 = "Home" //For the Home page : $pagetitle = "News" //For the news page : $pagetitle1 = "Link" //For the Links page : : Now, assuming you all understood what Ijust said... Is it possible? : -- : : Jason Whitaker : "Steven Walker" <[EMAIL PROTECTED]> wrote in message : [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... : : Jason, : : : : If I understand your question, you want to display the contents of a : : variable to screen? Try this: : : : : > : : > : : > : : > : : > : : > $test_variable = "this is a test"; : : > echo "Here is what it says: $test_variable"; : : > ?> : : > : : > : : : : Also note that you do not need to use the PHP tags twice: : : echo " //incorrect : : echo "wtakr home"; //correct : : : : Steven J. Walker : : Walker Effects : : www.walkereffects.com : : [EMAIL PROTECTED] : : : : On Monday, February 11, 2002, at 09:34 PM, Jason Whitaker wrote: : : : : > I just saw something with my code there.. i have my title tag.. i will have to fix that :) : : > : : > -- : : > : : > Jason Whitaker : : > : : > : : > "Jason Whitaker" <[EMAIL PROTECTED]> wrote in message : : > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... : : > : Is there a way to set a variable or is there a function that takes the : : > : information between the title tags and prints to the screen where you : : > : command? : : > : : : > : ei: : : > : : : > : // : : > : // : : > : // : // echo " : : > : // ?> : : > : // : : > : // : : > : // : : > : // : : > : : : > : where as i would want the word "home" from the echo "" : : > (or : : > : what ever word that may be in place of the word home) to print to : : > say.. a : : > : certain place in the body of the page? : : > : : : > : : : > : Jason Whitaker : : > : : : > : : : > : : > : : > : : > -- : : > PHP General Mailing List (http://www.php.net/) : : > To unsubscribe, visit: http://www.php.net/unsub.php : : > : : > : : : : -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: function? variable?
OK,... For each page on my site there will be a different title. Example: ?> or ?> What I want to know how to take the word that is currently in the place of "News" or "home".. Wait.. I think I may have figured it out... What if I set a variable in the body of the page that looks like this: $pagetitle1 = "Home" //Changeing the word "Home" with the title of what ever page the User is on. //EI: Users on the Homepage, variable is set to Home, or user is on News //page, variable is set to News. //Where as the code would look like this if the user was on the News page. $pagetitle = "News" Then I use the variable($pagetitle) in the title pags, like so: ?> And that way I can use that same variable anywhere else in the page. And when I edit the code and need to change the page title I change it where I set the variable. EI: $pagetitle1 = "Home" //For the Home page $pagetitle = "News" //For the news page $pagetitle1 = "Link" //For the Links page Now, assuming you all understood what Ijust said... Is it possible? -- Jason Whitaker "Steven Walker" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... : Jason, : : If I understand your question, you want to display the contents of a : variable to screen? Try this: : : > : > : > : > : > : > $test_variable = "this is a test"; : > echo "Here is what it says: $test_variable"; : > ?> : > : > : : Also note that you do not need to use the PHP tags twice: : echo " //incorrect : echo "wtakr home"; //correct : : Steven J. Walker : Walker Effects : www.walkereffects.com : [EMAIL PROTECTED] : : On Monday, February 11, 2002, at 09:34 PM, Jason Whitaker wrote: : : > I just saw something with my code there.. i have my title tag.. i will have to fix that :) : > : > -- : > : > Jason Whitaker : > : > : > "Jason Whitaker" <[EMAIL PROTECTED]> wrote in message : > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... : > : Is there a way to set a variable or is there a function that takes the : > : information between the title tags and prints to the screen where you : > : command? : > : : > : ei: : > : : > : // : > : // : > : // : // echo " : > : // ?> : > : // : > : // : > : // : > : // : > : : > : where as i would want the word "home" from the echo "" : > (or : > : what ever word that may be in place of the word home) to print to : > say.. a : > : certain place in the body of the page? : > : : > : : > : Jason Whitaker : > : : > : : > : > : > : > -- : > PHP General Mailing List (http://www.php.net/) : > To unsubscribe, visit: http://www.php.net/unsub.php : > : > : -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: function? variable?
Jason, If I understand your question, you want to display the contents of a variable to screen? Try this: > > > > > >$test_variable = "this is a test"; > echo "Here is what it says: $test_variable"; > ?> > > Also note that you do not need to use the PHP tags twice: echo " //incorrect echo "wtakr home"; //correct Steven J. Walker Walker Effects www.walkereffects.com [EMAIL PROTECTED] On Monday, February 11, 2002, at 09:34 PM, Jason Whitaker wrote: > I just saw something with my code there.. i have my title tag.. i will have to fix that :) > > -- > > Jason Whitaker > > > "Jason Whitaker" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > : Is there a way to set a variable or is there a function that takes the > : information between the title tags and prints to the screen where you > : command? > : > : ei: > : > : // > : // > : // : // echo " > : // ?> > : // > : // > : // > : // > : > : where as i would want the word "home" from the echo "" > (or > : what ever word that may be in place of the word home) to print to > say.. a > : certain place in the body of the page? > : > : > : Jason Whitaker > : > : > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] Re: function? variable?
Can you be more specific? I am just guessing here but is this what you want: Perhaps, I am not getting what you are asking for. On 11 Feb 2002 at 23:34, Jason Whitaker wrote: > I just saw something with my code there.. i have my title tag.. i will have to fix that :) > > -- > > Jason Whitaker > > > "Jason Whitaker" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > : Is there a way to set a variable or is there a function that takes the > : information between the title tags and prints to the screen where you > : command? > : > : ei: > : > : // > : // > : // : // echo " > : // ?> > : // > : // > : // > : // > : > : where as i would want the word "home" from the echo "" (or > : what ever word that may be in place of the word home) to print to say.. a > : certain place in the body of the page? > : > : > : Jason Whitaker > : > : > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > K E I T H V A N C E Web Developer, IT Professional http://www.vanceconsulting.net [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: function? variable?
I just saw something with my code there.. i have my wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... : Is there a way to set a variable or is there a function that takes the : information between the title tags and prints to the screen where you : command? : : ei: : : // : // : // : // ?> : // : // : // : // : : where as i would want the word "home" from the echo "" (or : what ever word that may be in place of the word home) to print to say.. a : certain place in the body of the page? : : : Jason Whitaker : : -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php