kevinkhan Posted July 1, 2011 Share Posted July 1, 2011 i want to convert this string string ="DJs in Cork, College Balls, UCC Medical Ball, Bands for College Balls"; to this DJs%20in%20Cork%2C%20College%20Balls%2C%20UCC%20Medical%20Ball%2C%20Bands%20for%20College%20Balls but when i apply the function urlencode($string) i am getting DJs+in+Cork%2C+College+Balls%2C+UCC+Medical+Ball%2C+Bands+for+College+Balls what could be the reason for this?? Quote Link to comment https://forums.phpfreaks.com/topic/240889-urlencode-not-working-the-way-i-want-it-to/ Share on other sites More sharing options...
Pikachu2000 Posted July 1, 2011 Share Posted July 1, 2011 rawurlencode will give you the second result, if that's what you're after. Quote Link to comment https://forums.phpfreaks.com/topic/240889-urlencode-not-working-the-way-i-want-it-to/#findComment-1237358 Share on other sites More sharing options...
Pikachu2000 Posted July 1, 2011 Share Posted July 1, 2011 Correction: it will give you the first result . . . The one with the %20's instead of spaces Quote Link to comment https://forums.phpfreaks.com/topic/240889-urlencode-not-working-the-way-i-want-it-to/#findComment-1237486 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.