Re: Newbie Problem with an IF Statement
| From: | Clete Rivers Blackwell 2 | Date: | Wed, 05 Mar 2003 23:36:03 +0000 |
| Subject: | Re: Newbie Problem with an IF Statement | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138392@lists.php.net to get a copy of this message | ||
You need ==, not just =... also, [status] is nothing... try $status...
"Jess Hunter" <JHunter@SPFLDSPARC.ORG> wrote in message
news:1191839C0BE5D511A0420050FC23F3F72D1220@SERVER40...
> I have a short bit of code that contains an if/else that is causing me
some
> trouble, I am sure that the answer is staring me straight in the face, and
I
> am not seeing it.
>
> Can someone take a look and see where I am coding wrong?
>
> <SNIPPET>
>
> if ("[status]='active'"){
> print ("the active line\n");
> } else {
> print ("inactive line\n");
> }
>
> </SNIPPET>
>
> Thanks in advance
>
> Jess