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