Recently, I had a list of command-line options in a table, and my browser was automatically inserting a line-break in-between the hyphen and the option character.
The do/while statement is sometimes used to break out of a block of code when an error condition occurs. For example:
1
2
3
4
5
6
do{
// do some stuff
if($error_condition)
break;
// do some other stuff
}while(false);
Because the condition for the loop is false, the loop is executed only once, regardless of what happens inside the loop. However, if an error occurs, the code after the break is not […]