Results 1 to 3 of 3

Thread: echo outputs in body but not inside head title

  1. #1
    Join Date
    Jan 2008
    Posts
    441
    Thanks
    67
    Thanked 4 Times in 4 Posts

    Default echo outputs in body but not inside head title

    im following the tutorial from
    http://www.dynamicdrive.com/forums/s...ad.php?t=28260

    however "echo $title;" seems to output inside the <body> but not inside <head>

    can anyone lend a hand please
    thank you

  2. #2
    Join Date
    Jan 2008
    Posts
    441
    Thanks
    67
    Thanked 4 Times in 4 Posts

    Default

    solved:
    i placed "<?php generateMenu(); ?>" before <html> tag so that the function would instantiate

  3. #3
    Join Date
    Jan 2008
    Posts
    441
    Thanks
    67
    Thanked 4 Times in 4 Posts

    Default

    this seems to work, but now the output from the template looks like this
    PHP Code:
    <div id="mainNav"><ul><li><class="buttons" href="?p=blue">Blue Page text</a></li><li><class="buttons" href="?p=red">Red Page text</a></li><li><class="buttons" href="?p=green" class="selected" >Green Page texter</a></li></ul></div><html
    <
    head
    <
    meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <
    link type="text/css" rel="stylesheet" href="css/style.css">
    <
    title>My PHP Template Green Page texter</title
    </
    head

    <
    body
    <
    div style="width:800px; height:600px; background-color:#00fc24"></div
    </
    body
    </
    html
    is there a way to get that div inside the body??

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •