View Full Version : /space replacement
magicyte
10-20-2008, 01:42 AM
Is there any possible way to replace a space with in any string w/ JavaScript or PHP? It be best if you give me an example in JavaScript.
-magicyte
zaphod42
10-20-2008, 02:30 AM
var myString='this is my string'
myString.replace(/ /g,' ')
or
myString.replace(/( )/g,' ')
magicyte
10-20-2008, 11:12 PM
Thanks.
-magicyte
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.