Home > Backend Development > PHP Tutorial > php数组获取

php数组获取

WBOY
Release: 2016-06-06 20:08:07
Original
1186 people have browsed it

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>
Copy after login

?

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

<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>
Copy after login
Related labels:
php
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