How can I use the fgetcsv function to read a CSV file into an array in PHP? Example code: - Biz Tech

How can I use the fgetcsv function to read a CSV file into an array in PHP? Example code:

Listen
$file = fopen("example.csv", "r");

$data = array();

while (($row = fgetcsv($file)) !== false) {
    $data[] = $row;
}

fclose($file);

print_r($data);