PHP Using {X} Notation With Strings To Read Or Write Individual Characters – String Function

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

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.