Using {x} notation with strings to read or write individual characters : String « String « PHP
- PHP
- String
- String
Using {x} notation with strings to read or write individual characters
$mystr = "Jello, world?";
$mystr{0} = "H";
$mystr{12} = "!";
print $mystr;
Related examples in the same category