gpt4 book ai didi

PHP : flatten array - fastest way?

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:37:07 25 4
gpt4 key购买 nike

<分区>

有没有什么快速的方法可以在不运行 foreach 循环的情况下展平数组并选择子键(在本例中为“key”和“value”),还是 foreach 总是最快的方法?

Array
(
[0] => Array
(
[key] => string
[value] => a simple string
[cas] => 0
)

[1] => Array
(
[key] => int
[value] => 99
[cas] => 0
)

[2] => Array
(
[key] => array
[value] => Array
(
[0] => 11
[1] => 12
)

[cas] => 0
)

)

收件人:

Array
(
[int] => 99
[string] => a simple string
[array] => Array
(
[0] => 11
[1] => 12
)
)

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com