php capitalize 1st letter code example Example 1: php uppercase first letter ucfirst($myword); Example 2: php capitalize first letter ucfirst("hello world!");