To get an array with the right keys, you can try this:
// Open file
$file = fopen($file_path, 'r');
// Headers
$headers = fgetcsv($file);
// Rows
$data = [];
while (($row = fgetcsv($file)) !== false)
{
$item = [];
foreach ($row as $key => $value)
$item[$headers[$key]] = $value ?: null;
$data[] = $item;
}
// Close file
fclose($file);