Re: Help with nested if statements, is this possible?
| From: | Hugh Bothwell | Date: | Mon, 01 Apr 2002 14:59:03 +0000 |
| Subject: | Re: Help with nested if statements, is this possible? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-90957@lists.php.net to get a copy of this message | ||
... an old C trick: when comparing a variable to a
constant, put the constant first, ie
if ("Completed" == $payment_status) {
}
that way, if you accidentally use 'assignment-equals'
instead of 'equivalence-equals', you get a syntax error.
"Martinahingis" <rauf@ug.bcc.bilkent.edu.tr> wrote in message
news:20020401122115.57022.qmail@pb1.pair.com...
> if ($payment_status = "Completed")
> if you do this your if statement is invalid
> You should do