[Php-it] [PHP]- gestire le stringhe
Matteo Beccati
php at beccati.com
Fri Mar 30 09:41:08 CEST 2007
fbisignano at silaweb.it@ ha scritto:
> ________________SPONSOR______________
> Spazio pubblicitario libero.
> mail a info at ziobudda.net
>
>
>
> ________________SPONSOR______________
>
> Salve, ho un problema nel gestire alcune stringhe che hanno
> spazi nelle stringhe.
> La mia stringa è del tipo "C i a o C o m e s t a i" e
> vorrei togliere tutti gli spazi. Ho pensato di utilizzare le
> espressioni regolari... ma non saprei dove mettere le
> mani... potreste aiutarmi?
Ad occhio e croce:
$str = preg_replace('/(.) /', '$1', $str);
Ciao ciao
--
Matteo Beccati
http://phpadsnew.com
http://phppgads.com
More information about the Php-it
mailing list