title: How to set current page "active" in php
body: <p>Hi I have a menu on my site on each page, I want to put it in it's own menu.php file but i'm not sure how to set the <strong>class="active"</strong> for whatever page i'm on.
  Here is my code: please help me</p>
  
  <p><strong>menu.php:</strong></p>
  
  <pre><code>&lt;li class=" has-sub"&gt;
      &lt;a class="" href="javascript:;"&gt;&lt;i class=" icon-time"&gt;&lt;/i&gt; Zeiten&lt;span class="arrow"&gt;&lt;/span&gt;&lt;/a&gt;
      &lt;ul class="sub"&gt;
         &lt;li&gt;&lt;a class="" href="offnungszeiten.php"&gt;Öffnungszeiten&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a class="" href="sauna.php"&gt;Sauna&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a class="" href="frauensauna.php"&gt;Frauensauna&lt;/a&gt;&lt;/li&gt;
         &lt;li class=""&gt;&lt;a class="" href="custom.php"&gt;Beauty Lounge&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a class="" href="feiertage.php"&gt;Feiertage&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/li&gt;
  </code></pre>