A string in PHP is any sequence of characters. Here are some examples of strings:
PHP lets you work with strings in many different ways. For example, you can search a string for a piece of text; extract characters from a string; and format a string to make it easier to read or use.
In this tutorial you learn how to create strings in your PHP scripts. You look at:
- Creating strings with single quotes and double quotes
- Avoiding confusion by using braces syntax
- Escape sequences
- How to create multi-line strings
- Using your own delimiters to create strings