下面是php实现层叠菜单的动态生成代码,希望能够给需要的朋友启发,代码如下: HTMLBODY BGCOLOR=FFFFFFFORM ACTION="?php echo $PATH_INFO?" METHOD=POST?phpif (isset($hierarchy)){//$hierarchy[] = $selection;if (isset($hierarchy)){while(list($level, $sel) = each($hierarchy)){echo "INPUT TYPE=HI