fgetcsv.php : CSV File « File Directory « PHP






fgetcsv.php

 
<?php
   $fh = fopen("s.csv", "r");
   while (list($name, $email, $phone) = fgetcsv($fh, 1024, ",")) {
      echo "<p>$name ($email) Tel. $phone</p>";
   }
?>
  
  








Related examples in the same category

1.Generating comma-separated data
2.Making a CSV-formatted string
3.Parsing CSV Strings
4.Read csv file
5.Reading CSV data from a file
6.Tell the web client to view the CSV file in a seprate program
7.Printing comma-separated data
8.Putting comma-separated data into a string