Can you make a php fuction to put the <h1> tag as the page title?

Discussion in 'PHP' started by fadetoblack22, Jun 4, 2009.

  1. #1
    As the title says. Is this possible? If so can someone help me with it please.

    thanks.
     
    fadetoblack22, Jun 4, 2009 IP
  2. SHOwnsYou

    SHOwnsYou Peon

    Messages:
    209
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <?php
    $blah = "<h1>";
    echo "<title>$blah</title>";
    ?>

    Is this what you mean?
     
    SHOwnsYou, Jun 4, 2009 IP
  3. crivion

    crivion Notable Member

    Messages:
    1,669
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    210
    Digital Goods:
    3
    #3
    Yes it's possible
    I suggest you doing it via regular expressions (ie searching for <h1> tags and then printing the result into <title></title>)
     
    crivion, Jun 4, 2009 IP
  4. fadetoblack22

    fadetoblack22 Well-Known Member

    Messages:
    2,399
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    160
    #4
    Yeh, think that is what I was looking for.

    thanks.
     
    fadetoblack22, Jun 4, 2009 IP