분류 php

fgetcsv: read a csv file

컨텐츠 정보

  • 조회 1,626 (작성일 )

본문

<?php

   $fh = fopen("./demoCSV.csv", "r");

   while (list($name, $email, $phone) = fgetcsv($fh, 1024, ",")) {

      echo "<p>$name ($email) Tel. $phone</p>";

   }

?>

 

 

<!--

A,a@example.com,11111

B,b@example.com,22222

 

 

-->

 

php