Created
June 19, 2017 20:02
-
-
Save ig0r74/3a119de57af18588adb8554363535d55 to your computer and use it in GitHub Desktop.
CSV to PHP
This file contains 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 | |
$csvData = file_get_contents($fileName); | |
$lines = explode(PHP_EOL, $csvData); | |
$array = array(); | |
foreach ($lines as $line) { | |
$array[] = str_getcsv($line); | |
} | |
print_r($array); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment