0

如何重新排列以下数组

Array
(
[0] => Array
    (
        [0] => 1
        [1] =>  Electronic
        [2] =>  0
    )

[1] => Array
    (
        [0] => 2
        [1] =>  mobile
        [2] =>      1
    )

[2] => Array
    (
        [0] => 3
        [1] =>  Tv
        [2] =>      1
    )

[3] => Array
    (
        [0] => 4
        [1] =>  smartphone
        [2] =>  2
    )

[4] => Array
    (
        [0] => 5
        [1] =>  freeze
        [2] =>      1
    )

[5] => Array
    (
        [0] => 6
        [1] =>  lg
        [2] =>      5
    )

[6] => Array
    (
        [0] => 7
        [1] =>  philips
        [2] =>  3
    )

[7] => Array
    (
        [0] => 8
        [1] =>  Onida
        [2] =>      3
    )

[8] => Array
    (
        [0] => 9
        [1] =>  Samsung
        [2] =>  3
    )

[9] => Array
    (
        [0] => 10
        [1] =>  Apple
        [2] =>      4
    )

[10] => Array
    (
        [0] => 11
        [1] =>  Apple 1.0
        [2] =>  10
    )

[11] => Array
    (
        [0] => 12
        [1] =>  Sasmung flat
        [2] =>  9
    )

创建具有父子关系的父子关系,并将其保存在数据库中。我想将它们保存为 Wordpress 类别并在 wp-admin 类别中显示结果,因为显示类别。期待帮助。

4

1 回答 1

0

为什么不注册一个新的分类法?确保分层设置为真。

于 2012-08-29T12:31:17.257 回答