如何删除数组中的会话?

时间:2018-03-22 21:07:39

标签: php

我需要为我的网站编写产品包,但我无法从数组中删除索引。我在下面写了一个数组索引:

Array
(
    [0] => Array
        (
            [urun_id] => 174
            [urun_adi] => ANT-5527N - Dual Polarity Parabolic Dish Anten 4.8-6.1Ghz 27Dbi
            [urun_fiyati] => 672
            [urun_fiyati_kur] => TL
            [urun_adeti] => 1
        )

    [1] => Array
        (
            [urun_id] => 149
            [urun_adi] => Cloud Router Switch 16x SFP+(10G ) 1Gbit Eth 
            [urun_fiyati] => 1683
            [urun_fiyati_kur] => TL
            [urun_adeti] => 1
        )

    [2] => Array
        (
            [urun_id] => 175
            [urun_adi] => ANT-5531N - Dual Polarity Parabolic Dish Anten 4.8-6.1Ghz 31Dbi
            [urun_fiyati] => 694
            [urun_fiyati_kur] => TL
            [urun_adeti] => 1
        )

)

1 个答案:

答案 0 :(得分:1)

您可以使用unset

unset($array[2]);删除索引为2的元素