how to get first 7 string from a long string variable in php code example Example: php get first character of string $firstStringCharacter = substr("hello", 0, 1);