Changes

Jump to: navigation, search

PHP Flow Control and Looping

16 bytes removed, 20:13, 27 October 2016
m
Text replacement - "<table border="0" cellspacing="0"> " to "<table border="0" cellspacing="0" width="100%">"
<table border="0" cellspacing="0" width="100%"><tr>
<td width="20%">[[PHP Operators|Previous]]<td align="center">[[PHP Essentials|Table of Contents]]<td width="20%" align="right">[[PHP Functions|Next]]</td>
<tr>
<googlehtmlet>BUY_PHPphp</googlehtmlet>
== PHP Conditional Statements ==
<googlehtmlet>ADSDAQBOX_FLOWadsdaqbox_flow</googlehtmlet>
Just about everything in life revolves around decisions. We wouldn't get very far through the day if we weren't able to decide what to wear, what to eat and which roads to traverse on the way to work. Similarly computers would be of little use without some innate ability to evaluate choices and make decisions. If all we were able to do was provide a computer with a set of instructions that simply followed one after the other with no ability to make choices based on specific criteria, none of the software we have today would exist.
The ''break'' statement, when encountered in a loop breaks skips all remaining statements in the loop body and breaks the loop. The ''continue'' statement also skips all remaining statements in the loop for the current iteration, but returns to the top of the loop and allows it to continue running.
<googlehtmlet>BUY_PHP_BOTTOMphp</googlehtmlet>

Navigation menu