04-06-2008, 10:00 AM
|
#1 (permalink)
|
|
The Contributor
Join Date: Sep 2007
Location: London, UK
Posts: 47
Thanks: 4
|
Trimming Whitespace
Just a very small function for you, if you wish to replace spaces in a variable, use this function. The good this about it is that it does not matter how much whitespace there is, it will convert it to an _
PHP Code:
function removeSpace($input){ echo preg_replace("/(\s)+/", "_", $input); }
|
|
|
|