Read text file with format : Text File Read : File Directory PHP Source Code


PHP Source Code » File Directory » Text File Read »

 

Read text file with format




<?php

   $fh = fopen("intData.txt""r");
   /* Parse each SSN in accordance with integer-integer-integer format. */

   while ($user = fscanf($fh, "%d-%d-%d")) {
   list ($part1,$part2,$part3= $user;
   echo "Social Security: $part1-$part2-$part3 <br />";
   }
   fclose($fh);
?>

<!-- intData.txt

1-3-4
-->


           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo File Directory
» Text File Read