I want to change this ASP code to PHP, but I don't know how to write it.

Source: Internet
Author: User
Tags one more line
<%dim I,jdim tempstr,menu_1,menu_2tempstr = "System settings" TEMPSTR = TempStr & "@@ 系统 basic Settings" TEMPSTR = TempStr & "@@ 系统 Add" Te  Mpstr = tempstr & "@@ 管理员 management" TEMPSTR = TempStr & "@@ 管理员 login Password" tempstr = tempstr & "@@ 管理员 interface Configuration" TEMPSTR = TempStr & "@@ 短信 software operation Management" TEMPSTR = tempstr & "| | FAQ management "TEMPSTR = TempStr &" @@ 添加 FAQ "TempStr = tempstr &" @@ 添加 FAQ "TempStr = tempstr &" @@ 添加 character management "TEMPSTR = Tem PStr & "| | Reservation Notice "TEMPSTR = tempstr &" @@ 预约 notice "tempstr = tempstr &" @@ 预约 member management "TEMPSTR = TempStr &" @@ 预约 mass "tempstr = TempStr Amp "|| Appointment Outpatient "TEMPSTR = tempstr &" @@ 门诊 type "TEMPSTR = tempstr &" @@ 门诊 add "TempStr = tempstr &" @@ 门诊 import "TempStr = TempStr &am P "@@ 科室 Management" TEMPSTR = TempStr & "@@ 科室 add" TempStr = tempstr & @@ 科室 Management TempStr = tempstr & "@@ 科室 time Management" menu_1 = Split (T Empstr, "| |") For i = 0 to Ubound (menu_1) menu_2 = Split (Menu_1 (i), "@@")%>
  • <%=menu_2 (0)%>
      <%for j = 1 to Ubound (menu_2) Response.Write "
    • "& Menu_2 (j) &"
    • "Next%>
  • <%Next%>%>
    The ASP code to change to PHP, but I do not know how to write, should be used as an array to achieve it, this is a menu option. This is


    Reply to discussion (solution)

    No one to solve it?

    is to stitch the string,
    And then split the string
    Final loop output

    If you can understand the code above, you can change it to PHP.

    This is actually quite simple ah, you want to complicate, the code is written like this:

     
    • ". $vv. "";}? >
  • Thanks for the 5 floor, I think it's complicated.

    48-51 lines should be changed to:
    for ($j =1; $j
    {
    echo "

  • ". $Menu _2[$j]. "
  • ";
    }
    There will be one more line before you change it.
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.