explode CSV file : CSV « Development « PHP






explode CSV file


<?php
   $users = file("./demoCSV.csv");
   foreach ($users as $user) {
      list($name, $email, $phone) = explode(",", $user);
      echo "<p>$name ($email) Tel. $phone</p>";
   }
?>
<!--
A,a@example.com,11111
B,b@example.com,22222


-->
           
       








Related examples in the same category

1.Loading table data from a CSV file
2.fgetcsv: read a csv file
3.Read csv file