PHP 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
Strings, like everything in PHP, are 0-indexed.
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
// note that the replacement string need not be the same length as the substring replaced