Home / PHP Tips Generated By ChatGPT / Using strlen() to Get String Length in PHP Determine the length of a string. Source Code $length = strlen("Hello, World!"); echo $length; // Outputs: 13