Convert matching arrays to one single array

i need your help, i have an array which look like this

Array
(
    [vaccine_id] => 1
)
Array
(
    [vaccine_id] => 1
)
Array
(
    [vaccine_id] => 1
)
Array
(
    [vaccine_id] => 2
)
Array
(
    [vaccine_id] => 2
)
Array
(
    [vaccine_id] => 2
)
Array
(
    [vaccine_id] => 12
)
Array
(
    [vaccine_id] => 12
)
Array
(
    [vaccine_id] => 12
)

and i need to convert it so it can look some thing like this so that array with the same key and value should not repeat. e.g

Array
(
    [vaccine_id] => 1
)
Array
(
    [vaccine_id] => 2
)
Array
(
    [vaccine_id] => 12
)

my code looks like this. i am using codeigniter framework.

$data['vaccManagment'] = $this -> Common_model -> get_info('manage_epi_vacc', '', '','*', array('uncode' => $this -> uri -> segment(3), 'fmonth' => $this -> uri -> segment(4)));
        $vaccManagmentDetail = $this -> Common_model -> fetchall('manage_epi_vacc_items_record', '','vaccine_id', array('uncode' => $this -> uri -> segment(3), 'fmonth' => $this -> uri -> segment(4),'manage_vacc_id'=>$data['vaccManagment']->recid));
        $newDetail = array();
        foreach($vaccManagmentDetail as $detail){
            print_r($detail);
        }exit;

Thanks for your interest.


Click here view more answers http://ift.tt/1ks1P6X