if anatomy

 18 September 02:33   Acknowledgment to .

    Conditional structures are acclimated to ascendancy which statements get executed. They are composed of three axiological elements:

    Conditionals in PHP are structured identical to those begin in and . The anatomy begins with an if clause, which is composed of the chat if followed by a true/false account in parentheses ( ). The consecutive cipher will be independent in a block, denoted by coiled braces . Sometimes the braces are omitted, and alone one band will chase the if statement. abroad if and abroad clauses sometimes action afterwards the if clause, to analysis for altered statements.

    The if article says If this account is true, I wish the program to assassinate the afterward statements. If it is false, then avoid these statements. In abstruse terms, it works like this: If an if account is encountered, the true/false account in parentheses is evaluated. If the account is begin to be true, the consecutive block of cipher independent in coiled braces is executed. If there are no braces, the consecutive line, and Alone that band is executed. However, if the account is begin to be false, the program skips those curve and executes the next non-blank line.

    Following the if article are two alternative clauses: abroad and abroad if. The else-if article says If the endure account was false, lets see if this account is true. If it is, assassinate the afterward code. If it isnt, then skip it. Else-if statements are alone evaluated if the above-mentioned if account comes out to be false. Contrarily they are skipped. Additional than that, the else-if article works just like a approved if clause. If it is true, its block is executed, if not, its block is skipped.

    Finally, the abroad article serves as a across-the-board for an if statement. About the abroad account says If all of the above-mentioned tests fail, then assassinate this code.

    
     $foo = 1;

     $bar = 2;

     if($foo 4), then the aftereffect of the announcement will be TRUE, and the if anatomy will execute. However, if the announcement is ($x 4 AND $y 4 OR $y 4 AND $y 4 OR $y For Added Information==

    

 


Tags: block, statements, statement, false

 statement, clause, false, statements, braces, executed, block, following, execute, subsequent, structure, found, , true false statement,

Share if anatomy: Digg it!   Google Bookmarks   Del.icio.us   Yahoo! MyWeb   Furl  Binklist   Reddit!   Stumble Upon   Technorati   Windows Live   Bookmark

Text link code :
Hyper link code:

Also see ...

Permalink
Article In : Computers & Technology  -  Websites Help