Re: explode
| From: | CC Zona | Date: | Mon, 25 Jun 2001 02:32:39 +0000 |
| Subject: | Re: explode | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-55079@lists.php.net to get a copy of this message | ||
In article <8567454241.20010624191453@pacifier.com>,
rkurth@pacifier.com (Richard Kurth) wrote:
> $name="what+ever";
>
> $name1=explode("+",$name);
> $fname=$name1[0] ; this has what
> $lname=$name1[0] ; this has ever
>
> But if I pass the info from another page like this
>
> <a href="whatever.php?name=what+ever">test</a>
>
> $name1=explode("+",$name);
> $fname=$name1[0] ; this has what ever
> $lname=$name1[0] ; this has nothing in it
It's an HTTP issue. You only think you're passing "what+ever" in the
second example; the value actually being passed is "what ever". See
<http://php.net/urlencode> & <http://php.net/rawurlencode>
--
CC