I have a drop down list as part of an HTML form. I'm using a PHP array to store each option and then loop it to populate the list. It works fine, but the drop down list options may change over time, and I want a quick way for other people to edit them.
So it'd be better if I had a plain text file with:
Option 1
Option 2
Option 3
And then load that into an array in PHP, and using my current code it should all work.
However, each time the form is refreshed, that text file would be read again. Are there any performance issues or glitches with that? The server is more than capable.
Finally, if it seems a good way to go, I've found some basic PHP examples of reading text from a file, but not in the way I'm after - when a line ends, that's the end of a variable. I'd rather have nothing in the text file but the list options (no new line characters etc).
So it'd be better if I had a plain text file with:
Option 1
Option 2
Option 3
And then load that into an array in PHP, and using my current code it should all work.
However, each time the form is refreshed, that text file would be read again. Are there any performance issues or glitches with that? The server is more than capable.
Finally, if it seems a good way to go, I've found some basic PHP examples of reading text from a file, but not in the way I'm after - when a line ends, that's the end of a variable. I'd rather have nothing in the text file but the list options (no new line characters etc).