str replace - strip all unnecessary spaces in a php string -
i want strip spaces not between 2 letters:
$string = " bah bah bah bah "; $string = str_replace("/w /w", "+", $string); // goes here? this: $string = "bah+bah+bah+bah";
the idea want rid of unnecessary spaces(not @ beginning , end). not link search box on submit exploded + can = or basically
$string = preg_replace('/\s+/', ' ', $string);
Comments
Post a Comment