update: added additional note fields (#29551)
* fix: corrected placement of notes Some "note" fields were preemptive in their placement; I corrected their placement to be in more appropriate locations. * update: added additional note fields Added some additional "note" fields to assist those who are reading through the PHP documentation. * fix: formatting of escape sequence examples The formatting was a bit jumbled, so I cleaned up the formatting of the escape sequence. * update: improved examples I added a new example to demonstrate the use of a "break" statement in a while loop, as well as numbered each example. * update: add clarifying statement I added a note at the end of the description, with the goal of being a bit more explicit in terms of what the "continue" statement does.
This commit is contained in:
committed by
Randell Dawson
parent
e545aceab8
commit
723fa03609
@ -16,7 +16,7 @@ If/Else is a conditional statement where depending on the truthiness of a condit
|
||||
statement2;
|
||||
}
|
||||
```
|
||||
> **Note:** The `else` statement is optional.
|
||||
> **Note:** You can nest as many statements in an "if" block as you'd like; you are not limited to the amount in the examples.
|
||||
## If/Else Statement
|
||||
|
||||
```
|
||||
@ -30,7 +30,7 @@ If/Else is a conditional statement where depending on the truthiness of a condit
|
||||
statement4;
|
||||
}
|
||||
```
|
||||
> **Note:** `elseif` should always be written as one word.
|
||||
> **Note:** The `else` statement is optional.
|
||||
## If/Elseif/Else Statement
|
||||
|
||||
```
|
||||
@ -46,6 +46,7 @@ If/Else is a conditional statement where depending on the truthiness of a condit
|
||||
statement5;
|
||||
}
|
||||
```
|
||||
> **Note:** `elseif` should always be written as one word.
|
||||
## Nested If/Else Statement
|
||||
|
||||
```
|
||||
@ -87,6 +88,7 @@ For instance:
|
||||
echo 'One condition is true, and one condition is false!';
|
||||
}
|
||||
```
|
||||
> **Note:** It's a good practice to wrap individual conditions in parens when you have more than one (it can improve readability).
|
||||
|
||||
## Ternary Operators
|
||||
|
||||
|
Reference in New Issue
Block a user