Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 1
    You could try storing the parsed array in the session or Memcached. Maybe stored a PHP file with the hard coded array. Open the CSV file, parse it, save it to a PHP file. Then load the PHP file. Commented Jun 30, 2015 at 15:00
  • 4
    Is there a reason you're not storing this in a database? Commented Jun 30, 2015 at 15:01
  • I think a database was unnecessary since it also works with php. i also don't know how to store a file from an url directly to sql Commented Jun 30, 2015 at 15:04
  • you could simply write a PHP file, containing the generated array, and include this file. Or you could write the json to a javaScript file and include that into your output. Commented Jun 30, 2015 at 15:10
  • Why does it need to be in a CSV file and not a Database to begin with? Commented Jun 30, 2015 at 15:14