$str = "123456789"; $first = substr($str, 0, 1); #returns the first character $third = substr($str, 2, 1); #returns the third character