OK,...

For each page on my site there will be a different title.

Example:
<title>
    <?php
    echo "<?witakr home?>
    ?>
</title>

or

<title>
    <?php
    echo "<?witakr News?>
    ?>
</title>

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:


<title>
    <?php
    echo "<?witakr $pagetitle?>
    ?>
</title>

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:
:
: > <html>
: > <head>
: > <title></title>
: > </head>
: > <body>
: > <?
: > $test_variable = "this is a test";
: > echo "Here is what it says: $test_variable";
: > ?>
: > </body>
: > </html>
:
: Also note that you do not need to use the PHP tags twice:
: echo "<?witakr home?> //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 <link tag inside the
: > 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:
: > :
: > : //<head>
: > : //<title>
: > : // <?php
: > : // echo "<?witakr home?>
: > : // ?>
: > : //
: > : //<LINK REL=stylesheet HREF="css/sCSS.css" TYPE="text/css">
: > : //</title>
: > : //</head>
: > :
: > : where as i would want the word "home" from the echo "<?witakr home?>"
: > (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

Reply via email to