Menu; } if( $GLOBALS[HTTP_GET_VARS][MenuItem] ){ $currentItem = $GLOBALS[HTTP_GET_VARS][MenuItem]; } while( list( $i, $item ) = each( $menu ) ){ $strMenu.= $this->ParseItem( $item, $isSubMenu ); if( $currentItem ){ if( strcmp( $item[key], $currentItem )==0 ){ $strMenu.= $this->PrintMenu( $item[submenu], 1 ); } } } return $strMenu; } function ParseItem( $itemhash, $isSubMenu = 0 ){ return 'ParseProp($itemhash[properties]). '>'. $itemhash[label]. ''; } function ParseProp( $props ){ if( is_array( $props ) ){ while( list( $prop, $value) = each ( $props ) ){ $arr[] = "$prop=\"$value\""; } return implode(" ", $arr ); } } } ?>