I have an array like this:
$a = array( 0 => array(\'type\' => \'bar\', \'image\' => \'a.jpg\'), 1 => array(\'type\' => \'food\', \'ima
Using PHP >= 5.5, you could do:
$ar = array_unique(array_column($a, 'type'));
print_r($ar):
print_r($ar)
Array ( [0] => bar [1] => food [3] => default )
http://php.net/manual/en/function.array-column.php
http://php.net/manual/en/function.array-unique.php