我有以下数组:
Array
(
[0] => Array
(
[User] => Array
(
[firstname] => Chris
[lastname] => Willis
)
)
[1] => Array
(
[User] => Array
(
[firstname] => Test
[lastname] => Willis
)
)
...
我需要将其转换为类似于此的结构:
Array
{
'Chris-Willis' => 0
'Test-Willis' => 1
....
有哪些数组函数可以帮助做到这一点?
所以它需要是:
firstname-lastname => id