The function substring take any part of a string. Its syntax is :
substr(expression, nb_of_char_to_jump, nb_of_char_to_extract);
For example, your string $string="test". you want the 't' do:
$first_letter=substr($string,0,1);
0 : means that you don'nt want to skip any char
1 : means that you need only 1 char