Replace deprecated character access syntax

This `$string{0}` character access syntax was around for a while in PHP but always scared me.