$fp = fopen ($_FILES['order_file']['tmp_name'],"r"); while ($data = fgetcsv ($fp, 2048, ",")) {…
(while ($data = fgetcsv ($fp, 2048, ",")) !== false) {
$fhandle = fopen("my_file.csv","r"); if ($fhandle) { while (!feof($fhandle)) { $buffer = fgets($fhandle, 1024); $buffer = trim($buffer); $buffer = str_replace(chr(10),"",$buffer); $buffer = str_replace(chr(13),"",$buffer); if ($buffer != "" )
<?phpini_set('auto_detect_line_endings',TRUE);$handle = fopen('/path/to/file','r');while ( ($data = fgetcsv($handle) ) !== FALSE ) {//process}ini_set('auto_detect_line_endings',FALSE);?>