UnknownPlayer Posted November 22, 2010 Share Posted November 22, 2010 I have problem, there are users with "?" character in username, and their address to profile is /profile/username/. I have var: $username that is that username, now, how can i replace all that characters which cant open users profile.. I mean for "?" i need to put "%3F", how can i replace? I know with str_replace, but is there any other solution like htmlencode or something like that? :S Link to comment https://forums.phpfreaks.com/topic/219487-character-in-link/ Share on other sites More sharing options...
AbraCadaver Posted November 22, 2010 Share Posted November 22, 2010 urlencode() Link to comment https://forums.phpfreaks.com/topic/219487-character-in-link/#findComment-1138024 Share on other sites More sharing options...
hoogie Posted November 22, 2010 Share Posted November 22, 2010 Holy Moly, PHP has a function for everything! I'm still waiting for the awesome_website() function. Just pass it a variable that says what kind of website you want (music, store, information), and it will put it together for you. Link to comment https://forums.phpfreaks.com/topic/219487-character-in-link/#findComment-1138040 Share on other sites More sharing options...
UnknownPlayer Posted November 22, 2010 Author Share Posted November 22, 2010 Thanks.. Hhahaa Link to comment https://forums.phpfreaks.com/topic/219487-character-in-link/#findComment-1138153 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.