Re: URLencode
| From: | Tom Carter | Date: | Fri, 07 Sep 2001 22:11:41 +0000 |
| Subject: | Re: URLencode | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66494@lists.php.net to get a copy of this message | ||
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" <orther@webintellects.com>
To: "PHP User Group" <php-general@lists.php.net>
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
> brandon@webintellects.com
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
> -----Original Message-----
> From: Brandon Orther [mailto:orther@webintellects.com]
> 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: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>