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

Source: Internet
Author: User
I want to change this asp code to PHP, but I don't know how to write this post. finally, dandan0104 was edited by dandan0104 from 2014-06-12:15:28 & lt; % Dim & nbsp; I, jDim & nbsp; TempStr, Menu_1, Menu_2TempStr & nbsp; & lt; a & nbsp; style I want to change this asp code to PHP, but I don't know how to write it.

This post was last edited by dandan0104 at 12:15:28


<%
Dim I, j
Dim TempStr, Menu_1, Menu_2

TempStr = "system settings"
TempStr = TempStr & "@ system basic settings"
TempStr = TempStr & "@ add administrator"
TempStr = TempStr & "@ administrator"
TempStr = TempStr & "@ change logon password"
TempStr = TempStr & "@ SMS interface configuration"
TempStr = TempStr & "@ SMS software operation management"

TempStr = TempStr & "| FAQ management"
TempStr = TempStr & "@ add FAQ"
TempStr = TempStr & "@ manage FAQ"
TempStr = TempStr & "@ sensitive character Management"

TempStr = TempStr & "| reservation instructions"
TempStr = TempStr & "@ reservation notice"
TempStr = TempStr & "@ registered member management"
TempStr = TempStr & "@ SMS group"

TempStr = TempStr & "| outpatient reservation"
TempStr = TempStr & "@ outpatient type"
TempStr = TempStr & "@ add Department"
TempStr = TempStr & "@ department import"
TempStr = TempStr & "@ department management"
TempStr = TempStr & "@ expert add"
TempStr = TempStr & "@ expert management"
TempStr = TempStr & "@"

Menu_1 = Split (TempStr, "| ")
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
    %>





    %>
    I changed this asp code to PHP, but I don't know how to write it. it should be implemented using arrays. this is a menu option. This is
    ------ Solution --------------------
    Is the concatenation string,
    Then split the string.
    Last loop output
    ------ Solution --------------------
    This is actually quite simple. it is complicated for you to write the code like this:
     $ TempStr. = "system settings ";
    $ TempStr. = "@ system basic settings ";
    $ TempStr. = "@ add administrator ";
    $ TempStr. = "@ administrator ";
    $ TempStr. = "@ change logon password ";
    $ TempStr. = "@ SMS interface configuration ";
    $ TempStr. = "@ SMS software operation management ";

    $ TempStr. ="
    ------ Solution --------------------
    FAQ management ";
    $ TempStr. = "@ add FAQ ";
    $ TempStr. = "@ manage FAQ ";

    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.