Hi people.
the array = Anthony;User submitted comments.][John;User 2 comments][Dva;User3comments][Gringo;User4 comments
The above is in the database.
Im using
$op = explode("][","$comments");
foreach($op as $value)
{
$content .= '<br /><table>';
$content .= '<tr><td>'.$value.'</td></tr>';
$content .= '</table><br />';
}
To get the data into seperate tables. Works ok.
What i want to do is the same thing but get the names on a diffrent cell. As you can see the names are seperated by a ;
I can do a foreach again and extract just that info in side the first array, but this leaves the main "comments" still saying eg: john wrote: blah blah blah.
I dont want to hold the commenters name in a diffrent field in the database. i want it all in 1 field.
Im new to arrays, so im a little stuck with this.
Thankyou..