Description of php interview questions:
For example: my name is fanglor => ym eman si orlgnaf
Answers to php interview questions:
Copy code The code is as follows:
function restr ($str)
{
$str1 = explode (' ',$str);
$str2 = '' ;
$temp = '';
for ($i=0;$i{
$str2 .= $temp.strrev ($str1 [$i]);
$temp = ' ';
}
return $str2;
}
Test code:
Copy code The code is as follows:
$str = "my name is fanglor ";
echo restr ($str);
Print result:
ym eman si rolgnaf
http://www.bkjia.com/PHPjc/322330.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/322330.htmlTechArticleInstructions for php interview questions: For example: my name is fanglor =》ym eman si orlgnaf Answers to php interview questions: Copy The code is as follows: function restr ($str) { $str1 = explode (' ',$str); $str...