I need to highlight the node value when I select it.how can I wrirte code for that in php
my code is
function generate_menu($parent)
{
$has_childs = false;
global $menu_array;
foreach($menu_array as $key = $value)
{
//print_r($value);
if ($value['parentid'] == $parent)
{
if ($has_childs === false)
{
$has_childs = true;
$menu .= '<ul>';
}
$clor = 'black';
if(($_GET['id']>0) &&($key == $_GET['id']))
{
$clor = '#990000';
}
$chld = generate_menu($key);
$cls = ($chld != '')? 'folder' : 'file';
$menu .= '<li><span class="'.$cls.'" color='.$clor.'> ' . $value['humanid'].'-'.$value['title'] . ' <a href="index.php?id='.$key.'"><img src="images/edit.png" alt=" Edit" title="Edit"/></a></span>';
$menu .= $chld;
$menu .= '</li>';
}
}
if ($has_childs === true) $menu .= '</ul>';
return $menu ;
}
?