$array = array(
array(
'display' => 'hi',
'title' => 'hi'
),
array(
'display' => 'hi2',
'title' => 'hi2'
)
);
What I need is an array containing all of the display values.
This is perfect for array_column(). You can use it like this:
$values = array_column($array, "display");
print_r($values);
Output:
Array ( [0] => hi [1] => hi2 )
For more information about array_column() see the manual: http://php.net/manual/en/function.array-column.php