I have a sort of mini csv database into a mysql field, i.e. something like this:
one_one*one_two*one_three
two_one*two_two*two_three
three_one*three_two*three_three
As you can see, the file is separated with asterisks, but that's not the issue.
I want to explode the field (that entire asterisk-separated list) putting everything into an array that contains the different lines so then I could explode each line to get each individual value.
For example, exploding "thisfield[0]" with the character "*" would give me another array with the values "one_one", "one_two" and "one_three".
however, i've tried this:
$offices_ = explode('\n',$_SESSION['office_multi']);
foreach ($offices_ as $office_) {
$poff = explode('*', $office_);
// here go all the echoes for $poff[0],[1],[2]... etc.
}
Apparently exploding with \n to get each line individually isn't working. How could I do this?
In flat files, the file(); function automatically does it, but as I'm getting the value from the database (and then into a session variable) it doesn't seems to work.
Maybe it's sessions don't supporting multi line strings, but i don't think so.
Thanks in advance.