stupid submenus...

From: Bek (free.groin.removal.for.sp_at_mmers)
Date: 01/30/04

  • Next message: Dmitry Ruban: "Re: RegExp pattern to scan for NO HTML tags - need help"
    Date: Fri, 30 Jan 2004 16:07:27 +0800
    
    

    hello!

    i seem to be having a minor problem with extra menus on certain pages of
    my site. some pages have little subsections which are supposed to
    appear only on those pages that require it (e.g. the art section is
    supposed to have 2D and 3D links but no other pages are to etc).

    the last script i had which did the job looked something like (but isn't
    exactly):

    <?php
            $art_menu = array(
                    'page1',
                    'page2',
                    'etc',
            );

            if (in_array($content, $art_menu))
            {
                    $headers = "art_headers";
            }
    ?>

    and art_headers.php looked something like:

    <?php
            $art_headers = array(
                    'this' => 'index.php?content=this',
                    'that' => 'index.php?content=that',
            );

            foreach ($art_headers as $key => $value)
            {
                    echo "<a href='$value'>$key</a>";
            }
    ?>

    for once i havent forgotten to include() them on the page they're spozed
    to be displaying on :) anyway probably due to global problems (i did try
    to use $_GET with no success, probably coz i mutated usage of it) it
    doesn't want to work. i went for the obvious if ($content == "this") {
    spit out the menu } but that didn't seem to want to work either unless i
    took one of the = off and then it would display on every single page
    even when it wasnt spozed to, and if i tried using if / else if /else
    etc it kind of ignored everything after executing the first if block.

    too much thinking about it probably means ive missed something blatantly
    obvious. help please? :)

    thanks!

    Bek


  • Next message: Dmitry Ruban: "Re: RegExp pattern to scan for NO HTML tags - need help"