php delete enter in string code example Example: php remove enter from string $_result = trim(preg_replace('/\s+/', ' ', $original_text));