php while selecting a node should be highlighted
<p>I need to highlight the node value when I select it.how can I wrirte code for that in php
my code is</p>

<pre><code>function generate_menu($parent) {
    $has_childs = false;
    global $menu_array;
    foreach($menu_array as $key =&gt; $value) {
        if ($value['parentid'] == $parent) {
            if ($has_childs === false) {                
                $has_childs = true;
                $menu .= '&lt;ul&gt;';
            }
            $clor = 'black';

            if(($_GET['id']&gt;0) &amp;&amp;($key == $_GET['id'])) {
                $clor = '#990000';
            }
            $chld =  generate_menu($key);
            $cls = ($chld != '')? 'folder' : 'file';
            $menu .= '&lt;li&gt;&lt;span class="'.$cls.'" color='.$clor.'&gt;&amp;nbsp;'  . $value['humanid'].'-'.$value['title'] . ' &lt;a href="index.php?id='.$key.'"&gt;&lt;img src="images/edit.png" alt=" Edit" title="Edit"/&gt;&lt;/a&gt;&lt;/span&gt;';

            $menu .= $chld;
            $menu .= '&lt;/li&gt;';
        }
    }
    if ($has_childs === true) $menu .= '&lt;/ul&gt;';
    return $menu ;
}
</code></pre>
