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?? 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. 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 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
Archived
This topic is now archived and is closed to further replies.