How to displays keys of an array?
I have an array looking so:
Array
(
[0] => a
[1] => b
[3] => c
[4] => d
[15] => e
)
and i want to get something like that:
开发者_如何学PythonArray
(
[0] => a
[1] => b
[2] => c
[3] => d
[4] => e
)
How do I get the intended effect?
array_values($array)
Easy as pie :)
$new_array = array_values($old_array); //this will return sorted one
精彩评论