string show only 2 char in php code example Example: php get first character of string $firstStringCharacter = substr("hello", 0, 1);