title: Navigation with a ternary operator to set active class to the DIRECTORY link
body: <p>All my pages are in DIRECTORIES and are ALL named index.php</p>
  
  <p>I use independent modules, each in its own directory, so that they can be dropped into any web app. The links and the URLs end with: "directory_name/".
  basurl(); is a function to simplify links.</p>
  
  <pre><code>init.php  
  defined('PDQURL') or define('PDQURL', 'http://pdq/dev/');  
  function base_url($location) {return PDQURL.$location;}  
  
  nav.php
  &lt;a class="nav-link" href="&lt;?=base_url('index.php')?&gt;"&gt;Home&lt;/a&gt;
  &lt;a class="nav-link" href="&lt;?=base_url('conversions/')?&gt;"&gt;Conversions&lt;/a&gt;
  &lt;a class="nav-link" href="&lt;?=base_url('employees/')?&gt;"&gt;Employees&lt;/a&gt;
  </code></pre>