Re: problems with ==?
| From: | Seraphim | Date: | Fri, 07 Feb 2003 12:00:10 +0000 |
| Subject: | Re: problems with ==? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-134710@lists.php.net to get a copy of this message | ||
Peter Gumbrell wrote:
> In the following code
>
> $view = $HTTP_GET_VARS[view];
> print $view;
> if ($view == "vendor")
> { code here
> }
>
> print $view produces 'vendor'
>
> but the if statement in the next section isn't being triggered. Can
> anyone see what is wrong here? I have tried double quotes, single
> quotes and no quotes around 'vendor' but none of them work.
You forgot the qoutes around the array argument:
$HTTP_GET_VARS[view] should be $HTTP_GET_VARS['view'].
-Peter