Worst. Syntax. Ever.
July 6th, 2008
String access and modification by characterCharacters within strings may be accessed and modified by specifying the zero-based offset of the desired character after the string using square array brackets, as in
Note: Strings may also be accessed using braces, as in$str[42]. Think of a string as an array of characters for this purpose.$str{42}, for the same purpose. However, this syntax is deprecated as of PHP 6. Use square brackets instead.