Home > Backend Development > PHP Tutorial > 小弟我想给每个值,都添加一个元素c => 3,有没有系统函数

小弟我想给每个值,都添加一个元素c => 3,有没有系统函数

WBOY
Release: 2016-06-13 12:33:07
Original
1141 people have browsed it

我想给每个值,都添加一个元素c => 3,有没有系统函数啊
我想给每个值,都添加一个元素c => 3,不用foreach可以吗,有没有系统函数啊
$ary = 
Array
(
    [0] => Array
        (
            [a] => 1
            [b] => 2    
        )
    [1] => Array
        (
            [a] => 1
            [b] => 2    
        )
    ...
)
目标:
Array
(
    [0] => Array
        (
            [a] => 1
            [b] => 2  
    [c] => 3 
        )
    [1] => Array
        (
            [a] => 1
            [b] => 2  
    [c] => 3 
        )
    ...
)

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