我正在尝试过滤和重新索引这个数组。我的原始数组是 $_SESSION['ShowingRequests']。
我试过了
array_values(array_filter($_SESSION['ShowingRequests']))
和
array_values(array_filter($_SESSION['ShowingRequests']['ListingKey']))
array_values(array_filter($_SESSION['ShowingRequests']['Key']))
但它不会到达数组的第二级。我希望它从此开始
Array
(
[ListingKey] => Array
(
[1] => 97826889139
[2] => 97820967049
[4] => 97825243774
[5] => 97824864611
)
[Key] => Array
(
[1] => 2
[2] => 3
[4] => 5
[5] => 6
)
)
对此
Array
(
[ListingKey] => Array
(
[0] => 97826889139
[1] => 97820967049
[2] => 97825243774
[3] => 97824864611
)
[Key] => Array
(
[0] => 2
[1] => 3
[2] => 5
[3] => 6
)
)