Flow Control and Iteration
Flow control and iteration are two very useful features of most programming languages. Without them all programs would have to be linear and if you wanted something to happen three times, you would have to code it three times.
Flow control means exactly what it sounds like it should, controlling the flow of something. When using flow control for programming, what you are doing is regulating the order in which the code is executed, how many times it is executed, and if it is executed at all Programmatic flow control can be broken into three primary categories.
Conditionals
Conditionals allow us to specify wether or not to run a selected piece of code based on some prior condition. It is the first topic we will cover. It is broken into two lectures, the first is an introduction to conditionals. The second is a discussion of some of the more advanced tools available in PHP for comparing things.Iteration
Our next topic is iteration. Iteration, also known as looping, us to specify that a piece of code be run multiple times. Depending on circumstances, that can be one or more or zero or more times.
Functions Our last primary flow control tool is functions. Functions allow us to create named blocks of code to be called by name elsewhere in the script. This allows us to run a piece of code multiple times from multiple places in the script. It is also the first step to writing good, modular code. This section contains both a brief introduction to functions and a more detailed look at advanced function topics in PHP
Flow control and iteration are two very useful features of most programming languages. Without them all programs would have to be linear and if you wanted something to happen three times, you would have to code it three times.
Flow control means exactly what it sounds like it should, controlling the flow of something. When using flow control for programming, what you are doing is regulating the order in which the code is executed, how many times it is executed, and if it is executed at all Programmatic flow control can be broken into three primary categories.
Conditionals
Conditionals allow us to specify wether or not to run a selected piece of code based on some prior condition. It is the first topic we will cover. It is broken into two lectures, the first is an introduction to conditionals. The second is a discussion of some of the more advanced tools available in PHP for comparing things.Iteration
Our next topic is iteration. Iteration, also known as looping, us to specify that a piece of code be run multiple times. Depending on circumstances, that can be one or more or zero or more times.
Functions Our last primary flow control tool is functions. Functions allow us to create named blocks of code to be called by name elsewhere in the script. This allows us to run a piece of code multiple times from multiple places in the script. It is also the first step to writing good, modular code. This section contains both a brief introduction to functions and a more detailed look at advanced function topics in PHP
No comments:
Post a Comment