Detecting The Page & Then Doing Something
<p>I need the "Pages" link to be able to detect if the user is on any of the pages that are included in the dropdown menu for "Pages". Detecting whether they are on only 1 page is easy, I need to add multiple instances to the "Pages" item. Hopefully that makes a little more sense.</p>

<p>Here is what I have:</p>

<pre><code>&lt;li class='dropdown' id="menu1"&gt;
  &lt;a class="dropdown-toggle" data-toggle="dropdown" href="#menu1"&gt;Pages&lt;/a&gt;
    &lt;ul class="dropdown-menu"&gt;
      &lt;li&gt;
        &lt;a href="index.php"&gt;Home&lt;/a&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;a href="about.php"&gt;About&lt;/a&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
&lt;/li&gt;
</code></pre>

<p>A example of what the code would look like for JUST index.php would be:</p>

<pre><code>&lt;li &lt;?php if (stripos($_SERVER['REQUEST_URI'],'index.php') !== false) {echo 'class="active"';} ?&gt;&gt;
    &lt;a href="index.php"&gt;Home&lt;/a&gt;
&lt;/li&gt;
</code></pre>

<p>Like I said before, I need to add multiple instances in basically one PHP block to detect MORE THAN if the user is JUST ON <em>[filename]</em>.php</p>

<p>Hopefully this makes sense.</p>
