0
jessica posted
how to convert multidimensional array to single dimensional array in php
how to convert multidimensional array to flat array . flat array means single dimensional array ,
$records = array(
array(
'id' => 2135,
'first_name' => 'jessica',
'last_name' => 'ram',
),
'id'=>2134,
array(
'id' => 5342,
'first_name' => 'Ram',
'last_name' => 'ranghuvanshi',
)
);
$first_names = array_column($records, 'first_name');
print_r($first_names);
it give firstname list only but i need to make array with single dimensional with all value . do not want to skip any value from array.