Created
May 15, 2012 05:40
-
-
Save yesidays/2699390 to your computer and use it in GitHub Desktop.
Leer CSV con PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$handle = fopen("test.csv", "r"); | |
$columns = fgetcsv($handle, $max_line_length, ","); | |
if ($columns != "") { | |
foreach ($columns as &$column) { | |
$column = str_replace(".","",$column); | |
echo $column; | |
} | |
echo "<br />"; | |
while (($data = fgetcsv($handle, $max_line_length, ",")) !== FALSE) { | |
if ($data != "") { | |
foreach ($data as &$info) { | |
echo $info; | |
} | |
echo "<br/>"; | |
} | |
} | |
} | |
fclose($handle); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment