以下代码:
Array
(
[0] => one
[1] => two
[2] => three
[3] => two
[4] => four
)
Array
(
[0] => one
[1] => two
[2] => three
[4] => four
)
产生以下内容:
Array
(
[0] => one
[1] => two
[2] => three
[3] => four
)
如何保留连续的数组索引并生成以下内容:
struct
答案 0 :(得分:1)
再添加一行
getdefaultlocale
答案 1 :(得分:0)
您可以使用array_values
。
查看手册:https://secure.php.net/manual/en/function.array-values.php