Re: script executeion problem - executes twice for no reason - help
| From: | Miguel Cruz | Date: | Mon, 22 Apr 2002 16:56:56 +0000 |
| Subject: | Re: script executeion problem - executes twice for no reason - help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94032@lists.php.net to get a copy of this message | ||
On Mon, 22 Apr 2002, Edward Bailey wrote:
> if()
> {$filename = "../includes/news.html";
This condition will always return true.
What you are doing here is first executing the assignment:
$filename = "../includes/news.html";
and then testing the outcome of that assignment (which is
"../includes/news.html").
If you want to test whether or not $filename contains
"../includes/news.html", then you should use == instead of =
miguel