It is recommended to use CSS processing for arranged display, which is not within the scope of PHP program logic. For example, your current program logic indicates that 7 pieces of data are displayed in a row. Suppose
your HTML code is as follows: 111... 777 You can modify $pagesize=7; so that He displays 14 items and then uses CSS to make each LI element float:left; and then specifies the maximum width of each LI element so that each row can only accommodate two columns, so that
can achieve 14 The data is displayed in two columns. To modify the layout in the future, you only need to modify the CSS. Remember, never try to replace things at the page presentation layer with program logic, use HTML and CSS