Guarda bene!!!
La temperatura da te deve essere molto elevata....
Tuo Codice
$text = str_replace("\n","","$text" );
Mio codice
$text = str_replace("\n","",$text);
Guarda bene!!!
La temperatura da te deve essere molto elevata....
Tuo Codice
$text = str_replace("\n","","$text" );
Mio codice
$text = str_replace("\n","",$text);
Mirko Agrati
WEB : http://mirkoagrati.110mb.com
RSS : http://feeds.feedburner.com/MirkoAgratiArticoli
prova con le preg di anakin
http://forum.html.it/forum/showthrea...hreadid=986646
si, fa molto caldo...
comunque, anche così ($text = str_replace("\n","",$text)non funziona.
darò un'occhiata alle preg di anakin, che non conosco.
e la funzione strip_tags, cos'è?
metatad
graphic & web design
allora io non ho capito una cosa:
se non vuoi avere delle righe vuote perchè usi la funzione nl2br?
Ok, finalmente ho risolto!!!
Così, funziona:
Grazie a tutti...Codice PHP:$text = $_POST["text"];
$text = preg_replace('/((\r)?\n){2,}/', "\n", $text);
$text = nl2br($text);
![]()
metatad
graphic & web design