Home  >  Article  >  Backend Development  >  Create a variable multi-level horizontal menu bar

Create a variable multi-level horizontal menu bar

WBOY
WBOYOriginal
2016-07-25 08:47:31858browse
";
  • echo '
  • echo '';
  • }
  • 复制代码
    Just modify $first_menus, $second_menus, $java_menus in the _create_html() method.

    一直做android,现在想自己做一个博客,就学了php,代码质量和性能还请大家斧正。
    1. /**
    2. * Created by PhpStorm.
    3. * User: chshqiang
    4. * Date: 13-11-28
    5. * Time: 下午5:05
    6. * 在_create_html()方法中修改$first_menus、$second_menus、$java_menus即可。
    7. */
    8. //_create_css(0, 5);
    9. echo '';
    10. _create_html();
    11. function _create_css($orientation = 0, $count = 3) // 创建可变多级菜单
    12. {
    13. echo '';
    14. }
    15. function _create_html()
    16. {
    17. $first_menus = array("Home", "Log", "Image", "IT", "CO", "About");
    18. $second_menus = array("Home" => null
    19. , "Log" => array("zero dollars", "wrapping text", "styled form", "active focus")
    20. , "Image" => array("spies menu", "vertical menu", "enlarging list", "link images")
    21. , "IT" => array("java", "c", "php", "node.js", "android", "ios")
    22. , "CO" => array("视云", "欢流", "万普", "百度", "九城")
    23. , "About" => null);
    24. $java_menus = array("java" => array("j2ee", "j2se", "j2me", "android", "tomcat"));
    25. $ul_s = '
        ';
      • $ul_e = '
      ';
    26. $li_s = '
    27. ';
    28. $li_e = '
    29. ';
    30. $table_s = "
      ";
    31. $table_e = "


    Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Previous article:joseph ringNext article:joseph ring