well, it really all depends on your needs,
to address your question, when ever you are going to use explode, make sure your dividing by a character t hat you wont be using in the terms.
For example, exploding with spaces will work for "apple banana orange"
but for "Texas Nebraska New Jersey" it will output
Texas
Nebraska
New
Jersey
so seperating by commas, semi colons, colons or ever character sets you make up is a better idea because that way you dont compramise your data, example
Texas, Nebraska, New Jersey, Ohio ::: would work
you can even do
$Seperator=":X:"; //// something uncommon that ownt be used in your data
$String="New Jersey:X:New York, New York:X:foo();:X:292:X:";
$Arr=explode($Seperator, $String);
will output:
$Arr[0]="New Jersey";
$Arr[1]="New York, New York";
$Arr[2]="foo();"
$Arr[3]="292";
$Arr[4]="";
This method is by no means practical in terms of DB normalization, structure or optimization, but in the beginning making it work, and making it work well (right) are worlds apart, so you do it the method that you think you can handle.
Again, in terms of db storage, adding the same information over and over is impractical and not recommended, it becomes less manageable over time and makes the database bigger then it needs to be
So lets say every user can have multiple products, on a table where it all in one row a single user's entry can look like
Table 1:
Entry Id | User | Password | Product Title
1 | Billy | Goat | Bicycle
2 | Billy | Goat | Car
3 | Billy | Goat | Train
4 | Billy | Goat | Goat Coat
4 | Billy | Goat | Sox
A: making a log in would be very unreliable since in some instance there could be inconsistant data such as a misspelling of Goat to Gaot, so now the user can login with either Goat or Gaot
So username, passwords by rule of thumb should be in their own table with unique keys to make sure no usernames are alike.
😎 the repetition of Billy : Goat means that every time you wanna update the username or password you have to update all those fields
C) Like anything, a database's size is proportional to the data in it.
the value "Billy" being repeated will take up more space then an id "25"
In this case the differance isnt great, but when your dealing with large DB's, which you probably wont be for some time, that differance can be crucial to the DB