PHP query SQL output array problem help

Source: Internet
Author: User
Tags id3
I would like the results of SQL query output for the form of a note to get it?
For example, I query 19 data
How is the sort number 2 3 1 3
Display SQL data at ordinal 2 No. 0 to 4th ordinal and 1 2 3 4 5
Display SQL data at ordinal 3 5th to 8th ordinal and 1 2 3 4
Display SQL data at ordinal 1 9th to 13th ordinal and 1 2 3 4 5
Display SQL data at ordinal 3 14th to 16th ordinal and 1 2 3 4
probably means that.
id=2
The div under Id2 only displays 0~4 data, and the 5 IDs are 1 2 3 4 5, respectively.
Id=3
The div under ID3 only displays 5~8 data, and the 4 IDs are 1 2 3 4, respectively.
Id=1
The div under ID1 only displays 9~13 data, and the 5 IDs are 1 2 3 4 5, respectively.
Id=3
The div under ID3 only displays 14~16 data, and the 4 IDs are 1 2 3 4, respectively.




Reply to discussion (solution)

I've seen it a few times, and I don't understand.

That is true:
After querying to 18 data:

  • Data 1

  • Data 2

  • Data 3

  • Data 4

  • Data 5



  • Data 6

  • Data 7

  • Data 8

  • Data 9



  • Data 10

  • Data 11

  • Data 12

  • Data 13

  • Data 14



  • Data 15

  • Data 16

  • Data 17

  • Data 18


  • How does the PHP output work? Notice the number change of the ID!

    This, ID can also be reused, you are sure it is not a class or something,

    IDS cannot be duplicated, and second-dimensional arrays should be easily exported.

    IDS cannot be duplicated, and second-dimensional arrays should be easily exported.
    How to do it?

  • 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.