PHP Developer Question:
Tell me how many escape sequences are recognized in Double-Quoted Strings in PHP?
Answer:
There are 12 escape sequences you can use in double-quoted strings:
► - Represents the back slash character.
► " - Represents the double quote character.
► $ - Represents the dollar sign.
► - Represents the new line character (ASCII code 10).
► - Represents the carriage return character (ASCII code 13).
► - Represents the tab character (ASCII code 9).
► { - Represents the open brace character.
► } - Represents the close brace character.
► [ - Represents the open bracket character.
► ] - Represents the close bracket character.
► nn - Represents a character as an octal value.
► xnn - Represents a character as a hex value.
► - Represents the back slash character.
► " - Represents the double quote character.
► $ - Represents the dollar sign.
► - Represents the new line character (ASCII code 10).
► - Represents the carriage return character (ASCII code 13).
► - Represents the tab character (ASCII code 9).
► { - Represents the open brace character.
► } - Represents the close brace character.
► [ - Represents the open bracket character.
► ] - Represents the close bracket character.
► nn - Represents a character as an octal value.
► xnn - Represents a character as a hex value.
Previous Question | Next Question |
Which special characters need to escape in Double-Quoted Stings? | How you can include variables in Double-Quoted Strings in PHP? |