Quote:
Originally Posted by Lilmikeishere
Im assuming some knowledge of regex patterns would be useful here?
|
Well, yeah, if you want to understand that code. I'm not an expert in that field, but this:
Code:
preg_replace('#[ \r\n\t]+#si', ' ', ...
says replace all sequences of one or more "white space" characters (space, carriage return, newline, tab) with a single space. So obviously any name entered with more than one space in a row will be changed to one space. I was suggesting taking the space out of that pattern (the one right before \r).