Reading a character from a string

What do you do in PHP when you want to get the character at the specified index within the string? I’m not sure what the best way is, but the way that I’ve been using is with the substr function, passing in the index and a length of one.

Leave a Reply