gpt4 book ai didi

php - 根据列值对数据行进行分组

转载 作者:行者123 更新时间:2023-12-03 22:45:30 25 4
gpt4 key购买 nike

<分区>

是否可以根据子数组中的值对行进行分组?

数组

Array (
[4f5hfgb] => Array (
[0] => ACME
[1] => 4f5hfgb
[2] => Aberdeen
)
[sdf4ws] => Array (
[0] => ACME
[1] => sdf4ws
[2] => Birmingham
)
[dfgdfg54] => Array (
[0] => EDNON
[1] => dfgdfg54
[2] => Birmingham
)
[345bfg] => Array (
[0] => EDNON
[1] => 345bfg
[2] => Birmingham
)
[345fgfd] => Array (
[0] => VALVE
[1] => 345fgfd
[2] => Birmingham
)
)

是否可以将 [0] 中具有相同值的那些分 block ?

期望的输出

Array (
[4f5hfgb] => Array (
[0] => ACME
[1] => 4f5hfgb
[2] => Aberdeen
)
[sdf4ws] => Array (
[0] => ACME
[1] => sdf4ws
[2] => Birmingham
)
)

Array (
[dfgdfg54] => Array (
[0] => EDNON
[1] => dfgdfg54
[2] => Birmingham
)
[345bfg] => Array (
[0] => EDNON
[1] => 345bfg
[2] => Birmingham
)
)

Array (
[345fgfd] => Array (
[0] => VALVE
[1] => 345fgfd
[2] => Birmingham
)
)

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