Visit the Official PHP Website |
PHP ProgrammingBy James N HitzDecision-Making Control StructuresThese are constructs that execute a different segment of code if a certain condition prevails, and another segment of code if a different condition prevails. It makes a decision. Look at this phrase:
... we always make decisions at all times in our lives. To make the right decisions in life we undoubtedly require intelligence. PHP is no different. In this Lesson we try and make "intelligent" PHP scripts that will be able to decide what to put on. So what's it gonna be: a jacket or a t-shirt? That's not the real question though. The question is... "How will the computer be able to decide? Where will a PHP script get that kinda' wisdom?" It all boils down to two things: true or false. Let's see...
... true or false? That's all it is. PHP's code contructs that control decision making include:
|
JamHitz Productions