Re: any other way ?
| From: | Geir Eivind Mork | Date: | Thu, 05 Apr 2001 08:55:44 +0000 |
| Subject: | Re: any other way ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-47211@lists.php.net to get a copy of this message | ||
On 04 Apr 2001 17:25:14 +0100, TV Karthick Kumar wrote:
> Instead I would like to get rid of one comma in between the email
> address and just display and sepearte it with only comma, instead of two
> commas and it should work for all the combinations that's possible.
>
> What are the possible ways to do that ?. Even I am trying out here.
> My Code:
try:
<?
unset($vars['send_email']);
$email =
array("home_email1","home_email2","work_email1","work_email2");
foreach ($email as $em) {
if (strlen($svars[$em])) {
if (strlen($vars['send_email'])) $vars['send_email'] .= ", ";
$vars['send_email'] .= $svars[$em];
}
}
?>
--
php developer / CoreTrek AS | Clarke's Conclusion: Never let your
Sandnes / Rogaland / Norway | sense of morals interfere with doing the
web: http://www.moijk.net/ | right thing.