I am going to store a list created from a form with a field for each item.
Would it be better to make rows (item 1, item 2....) or store the input from the fields as an array?
Thanks.
Rows or an Array
Moderator: General Moderators
Re: Rows or an Array
How do you plan on storing the data exactly? To a file? To a database?
Re: Rows or an Array
database
Re: Rows or an Array
How many items are there, and what kind of data?
Re: Rows or an Array
five items, text. Probably limit the text to 100 characters an item.
Re: Rows or an Array
As long as you are sure that it will never be more than the 5 items, I see no reason why you can't use an array. That said, if you ever need to do ANYTHING other than display the items, like sort them, search them, etc. Use a table in the DB.