- array_column: documentation ( source)
- print_r: documentation ( source)
<?php
$arr = array(
array(
'firstname' => 'Bob',
'lastname' => 'Tomato'
),
array(
'firstname' => 'Larry',
'lastname' => 'Cucumber'
)
);
print_r(array_column($arr,"middlename"));