Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2003
    Location
    Massachusetts
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Simple Include() Problem... Variable In The Include Path

    Hey! I need some more help ...

    I just wrote this litte script, a navigation system.

    The problem is, I can't get the include(); to work right.

    I made the script so that all I have to do is place this on the navigation. In the parhenteses (sp? haha) would be the title of the block/nav section.

    <?php
    formatnav(Navigation);
    ?>

    Here's the script:

    PHP Code:
    <?php

    function formatnav($title) {

    echo 
    "<TABLE style=\"HEIGHT: 14px\" cellSpacing=0 cellPadding=0 width=155 border=0><TBODY><TR>
    <TD class=nav vAlign=top align=center height=14><span class=\"gensmall\">$title</span></TD>
    </TR></TBODY></TABLE><br>"
    ;

    include(
    'layout/blocks/$title.php');

    echo 
    "<br><br>";

    }
    ?>
    What's wrong?

  • #2
    New Coder
    Join Date
    Jun 2003
    Location
    Massachusetts
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    n/m ... i got it figured out
    -Matt


  •  

    Posting Permissions

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