开发者

How to rearrange the array element from 0th index in the sequence to end?

How to rearrange the array element from 0th index in the sequence to end in PHP?

UPDATED

I have an array:

$input =array{ 
                              2 => '13234390',
                              4 => '12345290',
                              5 => '21322210' 
                              }

now I want this array to be rearranged as

$input =array{ 
                              0 => '13234390',
                              1 => '12345290',
                              2 => '213222开发者_运维技巧10' 
                              }


With

  • array_values() returns all the values from the input array and indexes numerically the array.

Example:

$array = array_values($input);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜