Multi-dimensional array sorting!!

Source: Internet
Author: User
  • Chapter No. 2213

    Fourth first confrontation

  • Chapter II Delays two years

    Chapter fifth the beginning of the Yuan force

  • Chapter III E-Class work method

    Sixth Chapter Storage Card

  • Seventh chapter on the operation of Blood ban

    The tenth chapter of the first homicide

  • Eighth Chapter Force Control

    11th Chapter Baby Black Cloth

  • Nineth Chapter Save Me Supreme

    The 12th Chapter E-Class Dodge training



  • Like this code, how to use a multidimensional array correctly sorted?? For advice


    Reply to discussion (solution)

    Do not see an array, set up a tidy.

    The only thing that can be sorted is the HREF value, which is estimated to be matched, sorted, and then re-organized with Preg_match_all in subgroup mode.

    According to the "chapter" metadata.

    If you sort by chapter, it is recommended that you get an identifier and then sort it.

     $s =<<< TXT 
  • chapter number 2213
    Fourth first clash
  • second chapter delay two years
    Fifth Chapter Yuan Force start now
  • The third chapter E-Class Work Method
    Sixth chapter storage card
  • Chapter Seventh Blood Prohibition
    Tenth chapter first homicide
  • Eighth Chapter Force Control
    11th Chapter Baby Black Cloth
  • Nineth Chapter Save me Supreme
    12th Chapter E-Class Dodge training
  • TXT; $ar = Preg_split ('/
     
  • chapter number 2213
    Second chapter delay of two years
    Chapter E of the Law
    Chapter fourth initial confrontation
  • Fifth Chapter Force is now
  • Sixth Chapter storage card
  • Seventh chapter of the blood Prohibition
    Eighth Chapter Force Control
    Nineth Chapter Save Me Supreme
    Tenth chapter first kill
  • 11th Chapter Baby Black Cloth
  • 12th Chapter E-Class Dodge training /li>
  • 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.