如何把上面的数组变成下面的数组

WBOY
Release: 2016-06-13 11:57:06
Original
885 people have browsed it

怎么把上面的数组变成下面的数组



------解决方案--------------------
for循环,设i=0,取上面数组长度m。
for($i=0,$i$data[i]=array($ids[i],$names[i],$adds[i])
}

取m值的方法,记不得了,不过用循环可以判断出来。
$i=0
while($ids[$i]){
i++
}

不懂编程,只是偶尔看过些C语言的书,希望能帮到你。
------解决方案--------------------

$data = array_map(null, $ids, $names, $adds);
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!