Page 1 of 1
seperating text
Posted: Fri Jul 20, 2007 6:56 pm
by m2babaey
Hi
assuming the following records:
field1(name): m2babaey
filed2(hisemailids):
m2babaey1@yahoo.com,
m2babaey2@yahoo.com,
m2babaey3@yahoo.com
now can we do anything to display:
m2babaey:
m2babaey1@yahoo.com
m2babaey:
m2babaey2@yahoo.com
m2babaey:
m2babaey3@yahoo.com
Posted: Fri Jul 20, 2007 7:03 pm
by Zoxive
explode() maybe be of interest.
Posted: Fri Jul 20, 2007 9:58 pm
by Benjamin
Did you post the actual data? Post an actual record.
Posted: Fri Jul 20, 2007 10:03 pm
by feyd
Something tells me this should be normalized...
Posted: Fri Jul 20, 2007 11:24 pm
by m2babaey
of course m2babaey123 are not actual. but field 2 will be some email addresses posted from a textarea and I'd like to list them the way i said

Posted: Sat Jul 21, 2007 8:35 am
by superdezign
m2babaey wrote:of course m2babaey123 are not actual. but field 2 will be some email addresses posted from a textarea and I'd like to list them the way i said

Well if it's all in one field, you'll have to process it through PHP, which isn't even hard in the least.
Code: Select all
$emails = explode(',', $result->field2);
foreach($emails as $email)
{
echo $result->field1 . ': ' . trim($email) . "<br />\n";
}