时间:2021-07-01 10:21:17 帮助过:7人阅读
function restr ($str)
{
$str1 = explode (' ',$str);
$str2 = '';
$temp = '';
for ($i=0;$i{
$str2 .= $temp.strrev ($str1[$i]);
$temp = ' ';
}
return $str2;
}
测试代码:
代码如下:
$str = "my name is fanglor ";
echo restr ($str);
打印结果:
ym eman si rolgnafhttp://www.bkjia.com/PHPjc/322330.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/322330.htmlTechArticlephp面试题说明 : 例如:my name is fanglor =》 ym eman si orlgnaf php面试题的答案: 代码如下:
function restr ($str) { $str1 = explode (' ',$str); $str...