How to remove anchor from active navigation page using PHP?
<p>I am sure this is a fairly simple question to answer, but I am new to PHP, so I was hoping someone could help me solve this problem.</p>

<p>I have a dynamic navigation menu that works really well, but I want to remove the link from the current page in the menu.</p>

<p>Here is my code:</p>

<pre><code>  &lt;div id="navigation_menu"&gt;
  &lt;?
  foreach($pagedata-&gt;menu as $menuitem){
      $class = ($menuitem-&gt;uri == $requesteduri) ? 'navigation selection' : 'navigation page_select';

      ?&gt;
      &lt;div id="&lt;?=$menuitem-&gt;uri?&gt;" class="&lt;?=$class?&gt;"&gt;
        &lt;img class="nav_icon" src="&lt;?=PROTOCOL?&gt;//&lt;?=DOMAIN?&gt;/img/&lt;?=$menuitem-&gt;uri?&gt;.png"&gt;
        &lt;h1&gt;&lt;a href="&lt;?=PROTOCOL?&gt;//&lt;?=DOMAIN?&gt;/&lt;?=$menuitem-&gt;uri?&gt;"&gt;&lt;?=$menuitem-&gt;title?&gt;&lt;/a&gt;&lt;/h1&gt;
        &lt;h2&gt;&lt;?=$menuitem-&gt;description?&gt;&lt;/h2&gt;
        &lt;img class="go" src="&lt;?=PROTOCOL?&gt;//&lt;?=DOMAIN?&gt;/img/go.png"&gt;
      &lt;/div&gt;
      &lt;?      
  }
  ?&gt;
  &lt;/div&gt;
</code></pre>

<p>Any help would be greatly appreciated.  Thanks!</p>

<p>UPDATED CODE: (this is what works for me now)</p>

<pre><code>&lt;div id="navigation_menu"&gt;
    &lt;?
  foreach($pagedata-&gt;menu as $menuitem){
      $class = ($menuitem-&gt;uri == $requesteduri) ? 'navigation selection' : 'navigation page_select';
      ?&gt;
      &lt;div id="&lt;?=$menuitem-&gt;uri?&gt;" class="&lt;?=$class?&gt;"&gt;
        &lt;img class="nav_icon" src="&lt;?=PROTOCOL?&gt;//&lt;?=DOMAIN?&gt;/img/&lt;?=$menuitem-&gt;uri?&gt;.png"&gt;
        &lt;h1&gt;
                &lt;?php if ($menuitem-&gt;uri == $requesteduri):?&gt;
            &lt;?=$menuitem-&gt;title;?&gt;
                &lt;?php else: ?&gt;
            &lt;a href="&lt;?=PROTOCOL?&gt;//&lt;?=DOMAIN?&gt;/&lt;?=$menuitem-&gt;uri?&gt;"&gt;&lt;?=$menuitem-&gt;title?&gt;&lt;/a&gt;
                &lt;?php endif;?&gt;
                &lt;/h1&gt;
        &lt;h2&gt;&lt;?=$menuitem-&gt;description?&gt;&lt;/h2&gt;
        &lt;img class="go" src="&lt;?=PROTOCOL?&gt;//&lt;?=DOMAIN?&gt;/img/go.png"&gt;
      &lt;/div&gt;

      &lt;?      
  }

  ?&gt;
  &lt;/div&gt;
</code></pre>
