admin 管理员组

文章数量: 887007

php 数组降维,PHP

话说tp的查询,

大家用过的都应该清楚tp-select()出来是二维数组,

例:php有没有自带的的函数将其转换成一维数组,而不是用foreach来循环?

我这里为什么不想用foreach呢!因为数据量太大了,上万条的数据循环起来可能没发用!

array (size=10)

1 =>

array (size=11)

0 => string '终端编码' (length=12)

1 => string '积分' (length=6)

2 => string '姓名' (length=6)

3 => string '终端名称' (length=12)

4 => string '固定电话' (length=12)

5 => string '手机' (length=6)

6 => string '电子邮件' (length=12)

7 => string 'QQ' (length=2)

8 => string '邮编' (length=6)

9 => string '联系地址' (length=12)

10 => string '省区' (length=6)

2 =>

array (size=11)

0 => string '7108' (length=4)

1 => string '0' (length=1)

2 => string 'xxx' (length=6)

3 => string '济南高新技术产业区孙村镇辛庄卫生室' (length=51)

4 => string 'xxxxx' (length=8)

5 => null

6 => null

7 => null

8 => string '' (length=0)

9 => string '0' (length=1)

10 => string '山东D1区' (length=11)

3 =>

array (size=11)

0 => string '6588' (length=4)

1 => string '0' (length=1)

2 => string 'xxx' (length=9)

3 => string '01080018诸城市九台镇惠民药店' (length=38)

4 => string 'xxxx' (length=7)

5 => null

6 => null

7 => null

8 => string '' (length=0)

9 => string '0' (length=1)

10 => string '山东D1区' (length=11)

本文标签: php 数组降维 php