Re: ereg_replace
| From: | Matt Greer | Date: | Wed, 25 Jul 2001 15:51:34 +0000 |
| Subject: | Re: ereg_replace | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-59563@lists.php.net to get a copy of this message | ||
on 7/25/01 10:38 AM, Clayton Dukes at cdukes@cdukes.com wrote:
>
>
> Can someone tell me why this doesn't work?
>
> $home_street = ereg_replace (" " , "+" , $home_street);
>
> The input is "123 happy trail"
> I need the output to be "123+happy+trail"
Not exactly what you wanted, but you could do
implode("+", explode(" ", $home_street));
Matt