php replace two spaces with one
snippet in php

php replace two spaces with one

user2657

$output = preg_replace('!\s+!', ' ', $input);