这篇文章主要介绍了php循环table实现一行两列显示的方法,本文直接给出实现代码,重点就是在取余方法的运用,需要的朋友可以参考下
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
如:是其他字符类型,需要用到函数转化:
?
1 2 3 4 |
$str = "Hello world. It's a beautiful day."; print_r (explode(" ",$str)); ?> |
结果:
?
1 2 3 4 5 6 7 8 9 |
Array ( [0] => Hello [1] => world. [2] => It's [3] => a [4] => beautiful [5] => day. ) |