Home  >  Article  >  Backend Development  >  php数组获取

php数组获取

WBOY
WBOYOriginal
2016-06-06 20:08:071067browse

php数组获取
one two three 为数组 如果把下面的数字 放进去呢 就10个数字 最后一个放到1

回复内容:

php数组获取
one two three 为数组 如果把下面的数字 放进去呢 就10个数字 最后一个放到1

没明白你想表达什么?

那就是二维数组了呗

你的意思是让$array_1变成

$array_1 = array{
    'one' => array('1','2','3','10'),
    'two' => array('4','5','6'),
    'three' => array('7','8','9')
};

?

$j = 0;
$array_3 = $array_1;
for($i=0;$i

$array_1 = ["one", "two", "three"];
$array_2 = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"];

$tmp = array();
for($i = 0, $j = 0; $i 
Statement:
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