Dynamically give title for pages

Discussion in 'PHP' started by rekha, Nov 25, 2009.

  1. rekha

    rekha New Member

    Joined:
    Jan 17, 2008
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    I want to give title dynamically for every pages.I have a header.php page where I put the title as follows,

    <title><?php if (defined ('TITLE')) {
    print TITLE;
    }
    ?></title>

    In every page I defined the title as

    define ('TITLE', title goes here');

    It is working fine for me.But I don't know whether it gets indexed or google will ignore it.Or Is there any better sloution to change the title dynamically.Pls help.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    It does not matter to Google how you give the title and if your final HTML is fine Google should be fine.
     
  3. rekha

    rekha New Member

    Joined:
    Jan 17, 2008
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    0
    Oh ok.Thanks a lot
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    The pleasure is all mine.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice