PHP实现一维数组转二维数组的方法
本文实例讲述了PHP实现一维数组转二维数组的方法。分享给大家供大家参考。具体实现方法如下:
<?php $asr[1] = array("a","b","c","d"); $asr[2] = array("a","b","c","d"); $asr[3] = array("a","b","c","d"); $newarray = array(); foreach($asr as $a) { $newarray[] = $a; } print_r($newarray); ?>
希望本文所述对大家的php程序设计有所帮助。
相关推荐
sasac 2020-09-25
huangjie0 2020-09-25
cloudking000 2020-09-11
xiaoxiaokeke 2020-07-28
mingyunxiaohai 2020-07-28
honghao0 2020-07-27
风吹夏天 2020-07-26
夕加加 2020-07-20
CallmeZhe 2020-06-29
zhoujiyu 2020-06-28
清风徐来水波不兴 2020-06-16
Happyunlimited 2020-06-15
wanff0 2020-06-14
cuiguanjun 2020-06-13
啸林 2020-06-12
jiayuqicz 2020-06-09
章鱼之家 2020-06-08
guangmingsky 2020-06-05