remove last 2 characters of a string php code example Example: php remove last character from string $hell = substr('hello', 0, -1);