Puoi usare una regexp ma non solo.
Codice PHP:
<?php
$str0 = "";
$str1 = "Oggi è una brutta giornata";
print "Prima : $str1<br/>";
while ($str0 <> $str1) {
$str0 = $str1;
$str1 = str_replace(' ',' ',$str1);
}
print "Dopo : $str1<br/>";
?>
Puoi usare una regexp ma non solo.
Codice PHP:
<?php
$str0 = "";
$str1 = "Oggi è una brutta giornata";
print "Prima : $str1<br/>";
while ($str0 <> $str1) {
$str0 = $str1;
$str1 = str_replace(' ',' ',$str1);
}
print "Dopo : $str1<br/>";
?>
Ridatemi i miei 1000 posts persi !!!!
Non serve a nulla ottimizzare qualcosa che non funziona.
Cerco il manuale dell'Olivetti LOGOS 80B - www.emmella.fr