У меня есть массив, как показано ниже
Array
(
[0] => Array
(
[catid] => 3
[parent_id] => 1
[catname] => Uncategorized
[catdesc] =>
[nleft] => 20
[nright] => 21
[nlevel] => 1
)
[1] => Array
(
[catid] => 5
[parent_id] => 2
[catname] => Category 2
[catdesc] =>
[nleft] => 7
[nright] => 8
[nlevel] => 2
)
[2] => Array
(
[catid] => 3
[parent_id] => 1
[catname] => Uncategorized
[catdesc] =>
[nleft] => 20
[nright] => 21
[nlevel] => 1
)
[3] => Array
(
[catid] => 3
[parent_id] => 1
[catname] => Uncategorized
[catdesc] =>
[nleft] => 20
[nright] => 21
[nlevel] => 1
)
[4] => Array
(
[catid] => 7
[parent_id] => 2
[catname] => Flower
[catdesc] =>
[nleft] => 11
[nright] => 18
[nlevel] => 2
)
[5] => Array
(
[catid] => 8
[parent_id] => 7
[catname] => Lillies
[catdesc] =>
[nleft] => 12
[nright] => 13
[nlevel] => 3
)
[6] => Array
(
[catid] => 10
[parent_id] => 7
[catname] => Jasmine
[catdesc] =>
[nleft] => 16
[nright] => 17
[nlevel] => 3
)
[7] => Array
(
[catid] => 7
[parent_id] => 2
[catname] => Flower
[catdesc] =>
[nleft] => 11
[nright] => 18
[nlevel] => 2
)
[8] => Array
(
[catid] => 8
[parent_id] => 7
[catname] => Lillies
[catdesc] =>
[nleft] => 12
[nright] => 13
[nlevel] => 3
)
[9] => Array
(
[catid] => 10
[parent_id] => 7
[catname] => Jasmine
[catdesc] =>
[nleft] => 16
[nright] => 17
[nlevel] => 3
)
[10] => Array
(
[catid] => 3
[parent_id] => 1
[catname] => Uncategorized
[catdesc] =>
[nleft] => 20
[nright] => 21
[nlevel] => 1
)
[11] => Array
(
[catid] => 3
[parent_id] => 1
[catname] => Uncategorized
[catdesc] =>
[nleft] => 20
[nright] => 21
[nlevel] => 1
)
[12] => Array
(
[catid] => 10
[parent_id] => 7
[catname] => Jasmine
[catdesc] =>
[nleft] => 16
[nright] => 17
[nlevel] => 3
)
[13] => Array
(
[catid] => 3
[parent_id] => 1
[catname] => Uncategorized
[catdesc] =>
[nleft] => 20
[nright] => 21
[nlevel] => 1
)
[14] => Array
(
[catid] => 8
[parent_id] => 7
[catname] => Lillies
[catdesc] =>
[nleft] => 12
[nright] => 13
[nlevel] => 3
)
)
Из этого массива я хочу получить Unique Arrays.ie.Если catId такой же, его нужно исключить из списка.Как я могу это сделать?