Created
April 29, 2012 16:30
-
-
Save mebcomputers/2551712 to your computer and use it in GitHub Desktop.
php: explode to array from file
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 | |
$filename = "file.txt"; | |
$handle = fopen($filename, "r"); | |
$data = fread($handle, filesize($filename)); | |
$data_array = explode(",", $data); | |
foreach ($data_array as $value) { | |
echo $value.'<br>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment