重置数组键


Reset array keys

我有下面的数组,键为0,1,2,3,4

Array
(
[media_list] => Array
    (
        [0] => Array
            (
                [media_id] => c36ca1a05136461ba3642f943b3ac447
                [title] => Eat This: Best of 2015 31 DEC
                [description] => Enjoy this week's Eat This episode, 
                [thumbnail_url] => zbr.120x66.jpeg
                [duration] => 239867
            )
        [1] => Array
            (
                [media_id] => 3b9179b13a7943f0818e82ff7970a8ba
                [title] => Eat This: Encore - Crossroads Bake Shop
                [description] => Chuck visits the Crossroads Bake Shop 
                [thumbnail_url] => ZMw.120x66.jpeg
                [duration] => 253367
            )
        [2] => Array
            (
                [media_id] => e2f440d4a6314027b967f414e6692204
                [title] => Eat This:Robin's Nest
                [description] => 
                [thumbnail_url] => 84-.120x66.jpeg
                [duration] => 312733
            )
        [3] => Array
            (
                [media_id] => 0fb7fff38ced4dfc8061bf1528902384
                [title] => Eat This: Weinrich's Bakery
                [description] => The Philadelphia area is known for buttercakes,
                [thumbnail_url] => 0P_.120x66.jpeg
                [duration] => 274133
            )
        [4] => Array
            (
                [media_id] => 76ac830d33f34a7c97c725e341246376
                [title] => Encore - Eat This: Heritage Turkeys
                [description] => Eat This stops by Longview Farm Market in Collegeville to see
                [thumbnail_url] => 83x.120x66.jpeg
                [duration] => 262633
            )
       )
)

如果我从这个数组中删除了(取消设置)任何密钥(比如说我删除了密钥0),那么数组看起来像-

Array
(
     [1] => Array
        (
            [media_id] => 3b9179b13a7943f0818e82ff7970a8ba
            [title] => Eat This: Encore - Crossroads Bake Shop
            [description] => Chuck visits the Crossroads Bake Shop 
            [thumbnail_url] => ZMw.120x66.jpeg
            [duration] => 253367
        )
    [2] => Array
        (
        [media_id] => e2f440d4a6314027b967f414e6692204
        [title] => Eat This:Robin's Nest
        [description] => 
        [thumbnail_url] => 120x66.jpeg
        [duration] => 312733
    )
[3] => Array
    (
        [media_id] => 0fb7fff38ced4dfc8061bf1528902384
        [title] => Eat This: Weinrich's Bakery
        [description] => The Philadelphia area is known for   buttercakes
        [thumbnail_url] => P_.120x66.jpeg
        [duration] => 274133
    )
[4] => Array
    (
        [media_id] => 76ac830d33f34a7c97c725e341246376
        [title] => Encore - Eat This: Heritage Turkeys
        [description] => Eat This stops by Longview Farm Market in     Collegeville to see how their resident
            [thumbnail_url] => 83x.120x66.jpeg
            [duration] => 262633
    )
)

)

数组键从0,1,2,3,4更改为1,2,3,4我希望我的数组键从0,1,3,4,5开始,依此类推。

$array = array_values($array);