This is my array:
Array
(
[0] => Array
(
[entity_id] => 1
[value] => new
[label] => New
)
[1] => Array
(
[entity_id] => 3
[value] => pending_payment
[label] => Pending Payment
)
[2] => Array
(
[entity_id] => 4
[value] => pending_paypal
[label] => Pending Paypal
)
[3] => Array
(
[entity_id] => 5
[value] => processing
[label] => Processing
)
[4] => Array
(
[entity_id] => 6
[value] => complete
[label] => Complete
)
[5] => Array
(
[entity_id] => 7
[value] => canceled
[label] => Canceled
)
[6] => Array
(
[entity_id] => 8
[value] => closed
[label] => Closed
)
[7] => Array
(
[entity_id] => 9
[value] => holded
[label] => Holded
)
[8] => Array
(
[entity_id] => 10
[value] => payment_review
[label] => Payment Review
)
[9] => Array
(
[entity_id] => 11
[value] => new
[label] => New
)
[10] => Array
(
[entity_id] => 13
[value] => pending_payment
[label] => Pending Payment
)
UPDATE This is the result of the print_r. As you can see the array[0] with array[6] are the same. Also the array[7] with the array[1]. How can I get rid of one of them ? thx
I tried smth like this:
$input = $my_array
$temp = $input;
foreach ( $temp as &$data ) {
unset($data['id']);
}
$output = array_intersect_key($input, array_unique($temp));
but with no any result :( .
array_columnandarray_unique:) Can you change your output code in your question to aecho '<pre>'; print_r($array);one, please?