Imagine I have this array
$records = array(
array(
'id' => 2135,
'first_name' => 'John',
'last_name' => 'Doe',
),
array(
'id' => 3245,
'first_name' => 'Sally',
'last_name' => 'Smith',
),
array(
'id' => 5342,
'first_name' => 'Jane',
'last_name' => 'Jones',
),
array(
'id' => 5623,
'first_name' => 'Peter',
'last_name' => 'Doe',
)
);
I tried this
array_keys($records)
But it does not return this
Array
(
[0] => id
[1] => first_name
[2] => last_name
)
I want to know the name of the columns and how many of them to have the possibility to change the query on the database and have the table with the right amount of columns right away