Heim  >  Artikel  >  Backend-Entwicklung  >  php数组获取

php数组获取

WBOY
WBOYOriginal
2016-06-06 20:08:071119Durchsuche

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

回复内容:

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

没明白你想表达什么?

那就是二维数组了呗

你的意思是让$array_1变成

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

?

<code>$j = 0;
$array_3 = $array_1;
for($i=0;$i<count if></count></code>

<code>$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 </code>
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn