Need Help Fast: How do I put spaces in a url?

Discussion in 'PHP' started by stephen421, Apr 18, 2009.

  1. #1
    I don't really know how to explain the problem. So I'll give an example: On a youtube video if you click twitter under the share options it will show up as a url with spaces in it, and if you click on it the text will show up in the twitter status bar with the spaces. I need to know how to do this. I thought it had to do with %20 or something but when I try that the "%20" shows up. Can someone please help me out.
     
    stephen421, Apr 18, 2009 IP
  2. bluebenz

    bluebenz Well-Known Member

    Messages:
    876
    Likes Received:
    9
    Best Answers:
    2
    Trophy Points:
    138
    #2
    if you use php you can use :

    urldecode  and url encode 
    Code (markup):
     
    bluebenz, Apr 18, 2009 IP
  3. Dangy

    Dangy Well-Known Member

    Messages:
    841
    Likes Received:
    25
    Best Answers:
    2
    Trophy Points:
    155
    #3
    %20 is the default way for a space to be displayed you can altar and edit that with php coding.
     
    Dangy, Apr 18, 2009 IP
  4. creativeGenius

    creativeGenius Well-Known Member

    Messages:
    273
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    120
    #4
    just urlencode your url and get it like a regular querystring using urldecode
     
    creativeGenius, Apr 18, 2009 IP