Home  >  Article  >  Backend Development  >  php displays data in two rows

php displays data in two rows

巴扎黑
巴扎黑Original
2016-12-01 10:11:181592browse

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn