php how to get first char as var code example Example: php get first character of string $firstStringCharacter = substr("hello", 0, 1);