• Take advantage of using array_column and handle as below:
// Sample array of data
$students = [
['id' => 1, 'name' => 'John', 'age' => 20],
['id' => 2, 'name' => 'Jane', 'age' => 22],
['id' => 3, 'name' => 'Bob', 'age' => 19],
['id' => 4, 'name' => 'Alice', 'age' => 21],
];
// Extracting just the 'name' column from the array
$names = array_column($students, 'name');