![]() |
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:
|
The underlines remind me of some MOD_REWRITE urls. Haha
e.g. HTTP://WWW.EXAMPLE.COM/BLOG/MY_FIRST_ENTRY/ |
why not use
PHP Code:
|
Depends on what result you prefer. The original method will take any amount of spaces in a row and replace them with a single underscore. The second method would return one underscore for every space it found.
-m |
Quote:
</stupid-bump> |
Quote:
|
| All times are GMT. The time now is 06:54 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0