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:
Corey Abma
2018-12-13 03:51:39 -05:00
committed by Randell Dawson
parent e545aceab8
commit 723fa03609
4 changed files with 53 additions and 13 deletions

View File

@ -25,11 +25,14 @@ A _raw_ string can be used by prefixing the string with `r` or `R` which allows
print(r"An odd number of backslashes at the end of a raw string will cause an error\")
^
SyntaxError: EOL while scanning string literal.
#Some more examples of escape sequences.
Escape Sequence
\\ Prints Backslash
\` Prints single-quote
\" Prints double quote
\a ASCII bell makes ringing the bell alert sounds ( eg. xterm )
\b ASCII backspace ( BS ) removes previous character
\n Adds newline.
## Some more examples of escape sequences.
Escape Sequence <- Intended Character
- \\\ <- backslash
- \\' <- single quote / apostrophe
- \\" <- double quote / quotation mark
- \\a <- ASCII bell makes ringing the bell alert sounds ( eg. xterm )
- \\b <- ASCII backspace ( BS ) removes previous character
- \\n <- newline
- \\r <- carriage return