Skip to content

Instantly share code, notes, and snippets.

@staycreativedesign
Last active September 17, 2018 15:58
Show Gist options
  • Save staycreativedesign/3bafef528fcdb8ba257be3dc3cafa498 to your computer and use it in GitHub Desktop.
Save staycreativedesign/3bafef528fcdb8ba257be3dc3cafa498 to your computer and use it in GitHub Desktop.
I am trying to load this file which has an array of strings but when I load it it doesn't separate the the values... what am I doing wrong?
["foo","bar","biz"]
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
$contents = array(file("codes1.txt"));
foreach ($contents as $value) {
echo $value;
echo "<p>test</p>";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment