snowal raj

snowal raj

  • NA
  • 166
  • 39.5k

Read and write a csv file in php

Apr 7 2017 8:29 AM
Hai,
      I need to read and write from csv file ,
and i am try this but its not working
 
 

<?php
$file = fopen("C:\Users\Downloads\workorder.csv","r");

$sno=1;
while (($line = fgetcsv($file)) !== FALSE) {
//$line is an array of the csv elements
print_r($line);
}
fclose($file);


?> 
 
 
 

Answers (3)