Friday, April 29, 2011

Structures Condition and Repetition section

| Friday, April 29, 2011 | 0 comments

hey hey, You can implement this in php, and other programming languages​​,. The following is basic to know the loop

1. Structure Condition
Branching control structures (decision making) that control the structure function
to conduct elections for the command to be executed in accordance with certain conditions.
There are four branching orders in PHP, that is if, if .. else, if .. elseif, and switch.

Thinking smile Structure Condition If

stucture condition If
if (condition) {
statement-if-condition-true;
}

Description:
condition is a statement or a variable that should be checked TRUE or FALSE.

Winking smile Structure Condition If ... Else
If ... else command is used to select a statement based on a
condition. This command will execute a particular statement if the condition is true and will
run another statement if the condition is false. Syntax is
as follows:

if (condition) {
statement-if-condition-true;
} else {
statement-if-conditio -false;
}

Description:
condition of a statement or a variable that should be checked his TRUE or FALSE. If
the condition is TRUE, the statement in the if block will be executed, otherwise if
the condition is FALSE, the statement in the else block will be executed.

Be right back Structure Condition Switch ... Case
Command switches used as an alternative of the if ... elseif command. With
This command branching program will be more easily prepared and studied. Syntax writing
command switches are as follows:

switch (condition)
{
case constants_1:
statement_1;
break;
case constants_2:
statement_2;
break;

default:
statement_3;
}

Information
Command switch will select the given conditions and compare the results with
constants that are on the case. Benchmarking will start from konstanta_1
until the last constant. If the result of a condition equal to the value of certain constants, then
statement on these constants will run until the break statement is found. If
results from the same condition with no constants are given, then
the default statement will be executed.

 

Technorati Tags: ,,,,,,,,,,,,,,,,,,,
Windows Live Tags: Structures,Condition,Repetition,languages,Structure,decision,elections,accordance,statement,Description,TRUE,FALSE,Else,Syntax,Switch,Case,Command,Information,constants,elseif
WordPress Tags: Structures,Condition,Repetition,languages,Structure,decision,elections,accordance,statement,Description,TRUE,FALSE,Else,Syntax,Switch,Case,Command,Information,constants,elseif
Blogger Labels: Structures,Condition,Repetition,languages,Structure,decision,elections,accordance,statement,Description,TRUE,FALSE,Else,Syntax,Switch,Case,Command,Information,constants,elseif

0 comments:

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Post a Comment

thank you for visiting my blog and comment here. I hope the commentary contains a comment which intend to build and repair. criticism and suggestions I gladly accept.

Popular Posts

 

Total Pageviews

stat

© Copyright 2010. http://programminghaha.blogspot.com . All rights reserved | http://programminghaha.blogspot.com is proudly powered by Blogger.com | Template by o-om.com - zoomtemplate.com