復制代碼 代碼如下:
<?php
//頁面編碼設為utf8
header('Content-type: text/html; charset=utf-8');
$luokuan = "ABCDEFG-測試的啊-!!!一二三四五。。";
$n = mb_strlen("$luokuan","UTF-8");
//echo $n;
$newluokuan = "";
for ($i=$n;$i>=0;$i--)
{
$newluokuan.= mb_substr($luokuan,$i,1,'UTF-8');
}
echo $newluokuan;
?>