Replacing multiple spaces with a single space simple single line of php code: $output = preg_replace(‘/\s+/’, ‘ ‘, $input); This mean that spaces, tabs or line breaks (one or more) will be replaced by a single space. Replace multiple spaces
Replacing multiple spaces with a single space simple single line of php code: $output = preg_replace(‘/\s+/’, ‘ ‘, $input); This mean that spaces, tabs or line breaks (one or more) will be replaced by a single space. Replace multiple spaces