The substr function:
Remember the strings are Zero-Based - i.e. - the first character is character '0', the second character is character '1' and so on....
By that logic, the n-th character is character '(n-1)'
So you're n-th character can be extracted as $nth = substr($string, n-1, 1);