How to drop a variable from the $_GET in php
<p>I have a side nav link area for certain pages and it's built like so:</p>

<p>On the top of the side vertical nav i'm echoing the trainers first and last name. Below that is a pages array for each page path and it's item name on the side menu. </p>

<pre><code>echo "$trainer-&gt;last, $trainer-&gt;first&lt;/div&gt;";
            $pages = array('edit'=&gt;'Info','comment/lookup'=&gt;'Comments','images/lookup'=&gt;'Images','trainer_group_edit/lookup'=&gt;'Groups'); 
            echo matry::aliased_links($pages);
</code></pre>

<p>Paths are like this when clicked on different items:</p>

<pre><code>edit&amp;trainer_id=19584

comment/lookup&amp;trainer_id=19584

/images/lookup&amp;trainer_id=19584
</code></pre>

<p>Groups is on the end of the array the last menu item but when it's clicked I would like to drop the trainer_id variable in the get and maybe add a different variable, at this point it would be great if i could just drop it altogether. </p>

<p>Could i use the strtok function — Tokenize string??</p>

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

<p>here is the function for:
matry::aliased_links</p>

<pre><code>public static function aliased_links($pages = array(), $qs = array(), $class = 'vertical_nav', $base = 0)
    {
    $s = "&lt;ul class='$class'&gt;";
    foreach ($pages as $k=&gt;$v)
        {
        $dir = explode("/", $k);
        $s .= "&lt;li"; if (in_array(self::$me, $dir)) { $s .= " class='selected'"; }
        $s .= "&gt;&lt;a class='big' href='";
        $s .= $base ? self::base_to($k, $qs) : self::here_to($k, $qs);
        $s .= "'&gt;$v&lt;/a&gt;&lt;/li&gt;";
        }
    return $s . '&lt;/ul&gt;';
    }
</code></pre>
