Re: String reduce
| From: | Nicola Delbono | Date: | Fri, 12 Apr 2002 16:43:29 +0000 |
| Subject: | Re: String reduce | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-13058@lists.php.net to get a copy of this message | ||
try
$str = "Mot1;;Mot2;;;;;;;;;;;;;Mot3;;;;;;Mot4;;;;;;;Mot5;;;;Mot6";
$str = str_replace(";", "_;_", $str);
$str = str_replace("__;_", "", $str);
:-D
*********** REPLY SEPARATOR ***********
On 12/04/2002 at 16.10 Kriegers Horst wrote:
>Hi all,
>
>how can I replace the n ; with only one
>
>Mot1;;Mot2;;;;;;;;;;;;;Mot3;;;;;;Mot4;;;;;;;Mot5;;;;Mot6
>==>
>Mot1;Mot2;Mot3;Mot4;Mot5;Mot6
>
>So that I can explode it in an array.
>
>Thanks for your help
>Horst
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
dr. Nicola Delbono
info.key5@key5.com
Key5 di Delbono Nicola
V. G.M. Rossi, 12
25038 Rovato (Bs)
Tel 39 030 7242266
Fax 39 030 7242266
www.smscitta.com | www.musicalbox.it
www.filosofo.it | www.bollicine.com