title: using php to keep class active on sub links
body: <p>I'm after some advice with some php code I'm working on. So i'm working on a site that allows for adding the class active to links when the use lands on that url. I got that bit no problem with the following code:</p>
  
  <pre><code>&lt;?php echo ($_SERVER['REQUEST_URI'] == '/bricks/' ? ' active' : '');?&gt;
  </code></pre>
  
  <p>What i'm not sure on is keeping the link active if any link follows that. For instance, if someone lands on /bricks/page, /bricks/page2 etc etc i want to keep the active class in place. I'm assuming this is possible but my php skills don't stretch that far!</p>
  
  <p>Any help would be most appreciated.</p>