Just to extend on some of the answers here, as of PHP 5.5, array_column is what you want.
It actually has a few possible uses.
Using the sample array below, here are the different ways to use array_column.
$a = array(
array('id' => '1', 'name' => 'Joe'),
array('id' => '2', 'name' => 'Jane')
);
Retrieving a single column as the array
$b = array_column($a, 'name');
Would give you. Notice the auto keys starting from 0, as per a normal array.
$b[0] = 'Joe';
$b[1] = 'Jane';
Retrieving the full array with a column as the index.
$c = array_column($a, NULL, 'id');
Would result in the following.
$c[1] = array('id' => '1', 'name' => 'Joe');
$c[2] = array('id' => '2', 'name' => 'Jane');
Notice how the column I selected as the third parameter becomes the key for each item and I get the full array by setting the second parameter to null.
Of course, the final usage is to set both the 2nd and 3rd params.
$d = array_column($a, 'name', 'id');
Would give you the following.
$d[1] = 'Joe';
$d[2] = 'Jane';
I personally use the full 3 params for creating select option lists. If I have a table with my options, I query the table and get the result and pass it into this to get a list with the key as the value and the label. This is a brilliant way for building info sets that need to intersect by the index as well.