Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CSV file read fail (PHP )
- $row = 0;
- if($handle = fopen("SampleQuizData.csv","r") !== FALSE)
- {
- // WORKS UNTIL HERE, SO FILE IS BEING READ
- while(!feof(handle))
- {
- $line = fgetcsv($handle, 1024, ",") ;
- echo $line[2]; // DOES NOT WORK
- }
- }
- parijat,something,parijatYkalia@hotmail.com
- matthew,durp, mdurpdurp@gmail.com
- steve,vai,stevevai@gmail.com
- rajni,kanth,rajnikanth@superman.com
- <?php
- $row = 0;
- if (($handle = fopen("SampleQuizData.csv", "r")) !== FALSE)
- {
- while(!feof($handle)){
- $line = fgetcsv($handle, 1024, ",") ;
- echo "$line[2]";
- }
- }
- ?>
- while(!feof($handle)){
- while(!feof(handle)){
- <?php
- ini_set("auto_detect_line_endings", true);
- ?>
Add Comment
Please, Sign In to add comment