Inserting spaces
Posted: Wed Dec 08, 2004 7:36 am
How do I keep extra spaces from being stripped when I send a paragraph to a MySQL db and then display it later?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Sorry what does that mean? I am not using the trim function or anything just:AFAIK
Code: Select all
$text = nl2br($_POSTї'text']);
echo $text;Code: Select all
$string = preg_replace("/\s/", " ", $string);Code: Select all
$text = nl2br($_POSTї'text']);
$revised_text = preg_replace("/\s/", " ", $text);Code: Select all
echo $revised_textCode: Select all
$string = "ik ben veel ' spaties ver";
$string = preg_replace("/\s/", " ", $string);
echo $string;Code: Select all
ik ben      veel ' spaties ver