See my following array, i need to be able to remove the items that have the same values (e.g. Primary, Secondary etc.) Is there a way of doing this to the existing array via php or is it easier to do this before items are inserted into the array?
I've seen the array_unique function but not sure if I can use this seen as it's a multi dimensional array?
Array
(
[0] => SelectAttributeTypeOption Object
(
[error] =>
[ID] => 19
[value] => Primary
[th] => TextHelper Object
(
)
[displayOrder] => 0
[usageCount] =>
)
[1] => SelectAttributeTypeOption Object
(
[error] =>
[ID] => 20
[value] => Secondary
[th] => TextHelper Object
(
)
[displayOrder] => 1
[usageCount] =>
)
[2] => SelectAttributeTypeOption Object
(
[error] =>
[ID] => 20
[value] => Secondary
[th] => TextHelper Object
(
)
[displayOrder] => 1
[usageCount] =>
)
[3] => SelectAttributeTypeOption Object
(
[error] =>
[ID] => 21
[value] => Groups & Families
[th] => TextHelper Object
(
)
[displayOrder] => 2
[usageCount] =>
)
[4] => SelectAttributeTypeOption Object
(
[error] =>
[ID] => 19
[value] => Primary
[th] => TextHelper Object
(
)
[displayOrder] => 0
[usageCount] =>
)
[5] => SelectAttributeTypeOption Object
(
[error] =>
[ID] => 20
[value] => Secondary
[th] => TextHelper Object
(
)
[displayOrder] => 1
[usageCount] =>
)
[6] => SelectAttributeTypeOption Object
(
[error] =>
[ID] => 21
[value] => Groups & Families
[th] => TextHelper Object
(
)
[displayOrder] => 2
[usageCount] =>
)
[7] => SelectAttributeTypeOption Object
(
[error] =>
[ID] => 22
[value] => Adults
[th] => TextHelper Object
(
)
[displayOrder] => 3
[usageCount] =>
)
[8] => SelectAttributeTypeOption Object
(
[error] =>
[ID] => 19
[value] => Primary
[th] => TextHelper Object
(
)
[displayOrder] => 0
[usageCount] =>
)
[9] => SelectAttributeTypeOption Object
(
[error] =>
[ID] => 20
[value] => Secondary
[th] => TextHelper Object
(
)
[displayOrder] => 1
[usageCount] =>
)
[10] => SelectAttributeTypeOption Object
(
[error] =>
[ID] => 21
[value] => Groups & Families
[th] => TextHelper Object
(
)
[displayOrder] => 2
[usageCount] =>
)
)