Simplest way is to do this

$string = "my string";
$string=urlencode(str_replace(" ","+",$string));

ie use str_replace to manually replace spaces with +, urlencode then won't
do anything further to it

----- Original Message -----
From: "Brandon Orther" <[EMAIL PROTECTED]>
To: "PHP User Group" <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 11:05 PM
Subject: RE: [PHP] URLencode


> I just realized that on the server I am trying to run this on, URLEncode
> is working like rawurlencode.   Does anyone have any idea why this might
> be happening?
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
> -----Original Message-----
> From: Brandon Orther [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 07, 2001 2:41 PM
> To: PHP User Group
> Subject: [PHP] URLencode
>
> Hello,
>
> I am working on a script and using urlencode but not getting the results
> I want.  Does anyone know how to convert the spaces of a sting of text
> in "+" instead of %20?
>
> Thanks
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to