<?php $str=‘中文a字1符‘; echo strlen($str); echo ‘<br />‘; echo mb_strlen($str,‘UTF8‘); //輸出結果 //14 //6 ?>