Results 1 to 3 of 3

Thread:  /space replacement

  1. #1
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default  /space replacement

    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

  2. #2
    Join Date
    Feb 2008
    Posts
    42
    Thanks
    0
    Thanked 13 Times in 13 Posts

    Default

    Code:
    var myString='this is my string'
    myString.replace(/ /g,'&nbsp')
    or

    Code:
    myString.replace(/(&nbsp)/g,' ')

  3. #3
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    Thanks.

    -magicyte

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •