How to read csv file with php

if (($handle = fopen($_FILES['offline_sales']['tmp_name'], "r")) !== FALSE) {
            while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
                if(!array_filter($data)){
                    continue;
                }
                print_r($data);
                
            }
            fclose($handle);
        }