How does php get a segment of a string under an array

The

file is a .dat file (file 7m). The entire file is imported using the file () function with the following format

first you need to get the black box, which is part of a healthy value.

earlier, I used while loop to import and split explode one by one, but my own writing efficiency was not very efficient, so I tried to write it in file () instead.

Php
Mar.12,2021

I go directly to the pseudo code.

$file_handle = fopen('+','r');
if(feof($file_handle)){
    return '';
}
$header = fgets($file_handle);   // .
// .
$header = preg_replace('/\s+/',' ',$header);
$header = explode(' ',$header);  // header.
$data = []; // 
// ,
while(!feof($file_handle)){
    $content = fgets($file_handler); // .
    // ,,header..
    // 
    $row = array_combine($header,$content);   // 
    array_push($row);
}
print_r($data);exit;
Menu