Mega Code Archive

 
Categories / Php / Strings
 

Using {x} notation with strings to read or write individual characters

$mystr = "Jello, world?";     $mystr{0} = "H";     $mystr{12} = "!";     print $mystr;