| Start |
|---|
| String interpolation You can also use interpolation to interpolate (insert) a variable within a string. Interpolation works in double quoted strings and the heredoc syntax only. The complex (curly) syntax (opens new window) format provides another option which requires that you wrap your variable within curly braces The However, the Notice that the dollar The |
| Extracting/replacing substrings Single characters can be extracted using array (square brace) syntax as well as curly brace syntax. These two syntaxes will only return a single character from the string. If more than one character is needed, a function will be required, i.e.- substr (opens new window) Strings, like everything in PHP, are Strings can also be changed one character at a time using the same square brace and curly brace syntax. Replacing more than one character requires a function, i.e.- substr_replace (opens new window) |
Read Article
https://develop.horje.com/learn/1434/reference