2015-08-17 文字列の長さを得るstrlen()関数 php strlen()関数(文字列の長さを得る) <?php $str = 'abcdef'; echo strlen($str); // 6 $str = ' ab cd '; echo strlen($str); // 7 ?>