ap0c
07-16-2004, 01:46 AM
$_POST['xtraimg'] = trim(preg_replace('#\s+#si', ' ', $_POST['xtraimg']));
The above code strips all spaces completely out, only leaving one like it should.
However it removes spaces for paragraphs also. Is there a way a code can tell the difference between a spacebar space and a return/enter key newline/space?
The above code strips all spaces completely out, only leaving one like it should.
However it removes spaces for paragraphs also. Is there a way a code can tell the difference between a spacebar space and a return/enter key newline/space?