|
Split Apart Data Being Received - Newbie Help
I'm currently receiving some data into a single database field as shown below:
SomeVariable1 is string of text and it can have commas hence it's being separated by tilde ~ SomeVariable2, SomeVariable3, SomeVariable4
The data I'm receiving is a combination of various variables dumped into a single databse field. The first variable is separated by a ~ (tilde) because the first variable has customer comments and can include commas also. The rest of the variables are separated by commmas.
What I need to do is split apart the string so I can display them on a web page separately in different columns.
What I really want to do is along the lines:
$variable1 = All text before tilde
$variable2 = SomeVariable2
$variable3 = SomeVariable 3
$variable4 = SomeVariable 4
How can I accomplish this?
I'm a newbie in PHP and I'd appreciate any help.
|