Php loop table implementation method of displaying one row and two columns _ PHP Tutorial

Source: Internet
Author: User
Php looping table to display one row and two columns. Php loop table implementation method of displaying one row and two columns this article mainly introduces php loop table implementation method of displaying one row and two columns. This article provides the implementation code directly, the focus is to implement the display of one row and two columns in the php loop table of the remainder method.

This article mainly introduces how to implement display of one row and two columns in php Loop table. This article provides the implementation code directly, focusing on the use of the remainder method. if you need it, refer

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

$ I = 0;

Foreach ($ setarr as $ val ){

$ I ++;

?>

}?>

$ Setarr = array (,); // equivalent to the array obtained by the database

If ($ I % 2 = 0 & $ I

';
First column Column 2

For example, if it is another character type, function conversion is required:

?

1

2

3

4

$ Str = "Hello world. It's a beautiful day .";

Print_r (explode ("", $ str ));

?>

Result:

?

1

2

3

4

5

6

7

8

9

Array

(

[0] => Hello

[1] => world.

[2] => It's

[3] =>

[4] => beautiful

[5] => day.

)

This article describes how to implement display of one row and two columns in php Loop table. This article provides the implementation code directly, with the focus on the remainder method...

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.