欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

中英文字符串翻转函数_PHP教程

程序员文章站 2022-04-04 10:12:18
...
复制代码 代码如下:

//页面编码设为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;
?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/319701.htmlTechArticle复制代码 代码如下: ?php //页面编码设为utf8 header('Content-type: text/html; charset=utf-8'); $luokuan = "ABCDEFG-测试的啊-!!!一二三四五。。"; $n = mb_strle...