Another way you could do it would be to check each item in the
$GLOBALS["argv"] variable (or $argv).
        - Dan

-- 

---------- Forwarded message ----------
Date: Thu, 16 Aug 2001 14:18:09 -0400 (EDT)
From: Daniel Adams <[EMAIL PROTECTED]>
To: Jason Dulberg <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: RE: [PHP] bold current menu item

I suppose you could check the $GLOBALS["REQUEST_URI"] variable with a
regular expression or something.
        - Dan

On Thu, 16 Aug 2001, Jason Dulberg wrote:

> The menu that's taken from the database is basically a list of links like
> this
>
> $s="select * FROM molds m, prodlookup p WHERE p.cid=$cid and p.pid=m.id
> ORDER BY p.pid";
> $menu=mysql_query($s);
> while ($stuff = mysql_fetch_array($menu)) {
>       extract($stuff);
>       echo "<a href=\"?cid=$cid&id=$id&page=1\">".$title."</a><br>";
> }
>
> So basically there could be an unlimited # of links depending on how many
> products there are. I'm guessing that before I echo the link, I need to
> evaluate whether $id is in the current URL. How would I go about doing that?
>
> Thanks for your time.
>
> __________________
> Jason Dulberg
> Extreme MTB
> http://extreme.nas.net
>
>
> > On Thu, 16 Aug 2001 03:50, Jason Dulberg wrote:
> > > I am dynamically creating a menu based on a "title" field from a
> > > database.
> > >
> > > ie
> > > item1
> > > item2 etc.
> > >
> > > Is it possible that when I'm on the "item1" page to bold the title in
> > > the menu?
> > >
> > > Any suggestions are appreciated.
> > >
> >
> > Presumably there is a corresponding filed for filename, or URL, or
> > somesusch? If so, just check whether the current script name matches, and
> > if so add the <STRONG> tags where needed.
> >
> > --
> > David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
> > CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA
> >
> >    If at first you don't succeed, work for Microsoft.
> >
>
>
>

-- 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to