Re: String reduce
| From: | Hugh Bothwell | Date: | Fri, 12 Apr 2002 15:02:02 +0000 |
| Subject: | Re: String reduce | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-13078@lists.php.net to get a copy of this message | ||
"Kriegers Horst" <Horst.Kriegers@Sport-Toto.ch> wrote in message
news:1B37564CB0DDD111824D0000F8D05FAF0120EEB9@mail_srv_01.stg.swiss...
> Hi all,
>
> how can I replace the n ; with only one
>
> Mot1;;Mot2;;;;;;;;;;;;;Mot3;;;;;;Mot4;;;;;;;Mot5;;;;Mot6
> ==>
> Mot1;Mot2;Mot3;Mot4;Mot5;Mot6
alternatively,
$newstr = preg_replace("/;+/",";",$str);