Re: Explode adding an extra white space
| From: | Philip Olson | Date: | Mon, 08 Jan 2001 18:02:52 +0000 |
| Subject: | Re: Explode adding an extra white space | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33270@lists.php.net to get a copy of this message | ||
Explain how you use explode. But perhaps trim() will help before you
explode? Anyway, where is this white space?
$string = 'a,b,c,d';
$new = explode(',',$string);
foreach ($new as $key => $value) {
print "<br>$key is $value and " . strlen($value) . " in length\n";
}
I see no whitespace, please explain your use.
Philip
On Sat, 8 Jan 2000, Brandon Orther wrote:
> Hello,
>
> Does anyone know why when I use explode it adds a white space to the end?
> Does anyone have a fix for it?
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> brandon@webintellects.com
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>