Re: if then statement
| From: | John Nichel | Date: | Tue, 22 Apr 2003 15:35:16 +0000 |
| Subject: | Re: if then statement | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144845@lists.php.net to get a copy of this message | ||
You just want to know the syntax of an if statement?
if ( conditions ) {
some code;
} else {
some different code;
}
http://www.php.net/manual/en/control-structures.php#control-structures.if
Tim Haskins wrote:
for the life of me I cannot figure out how to do the following: (below not correct syntax, just the idea) If x == 1 then show something else show this end Now I don't want it all in one PHP script. I need it so that in dreamweaver, when I open the document, I see the opening IF PHP tag then my text of "show something", then the ELSE tag, my text of "show this", then the END tag. Now I can do this with asp(which I'm familiar with), but I am having difficulties trying to figure out a similar way in php. Any ideas? Thanks!! -- tbo