Re: Why won't this work?
| From: | Monty | Date: | Fri, 19 Jul 2002 07:31:10 +0000 |
| Subject: | Re: Why won't this work? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-108453@lists.php.net to get a copy of this message | ||
Well, first thing I see is that you need to change this:
if ($mode == "entrance")
You need the double equal signs for string comparison.
> From: johnw@orcasnet.com (John Wulff)
> Newsgroups: php.general
> Date: Fri, 19 Jul 2002 00:25:12 -0700
> To: php-general@lists.php.net
> Subject: Why won't this work?
>
> Any ideas on why this won't work? It will only include("inc/entrance.php")
> It never, no matter what the value of $mode, displays collection.php.
>
> <?php
> $mode = "entrance";
> if ($mode = "entrance") {
> include("inc/entrance.php");
> }
> else if ($mode = "collection") {
> include("inc/collection.php");
> }
>
> ?>
>
>