PHP经典:按字反转字符串
<?php
error_reporting(0);
$s="cyg&liwen";
$words=explode('&',$s);//去除掉&
$words=array_reverse($words);//反转字数组
$s=implode('&',$words);//重建反转后的字符串
print $s;
?>
<?php
error_reporting(0);
$s="cyg&liwen";
$words=explode('&',$s);//去除掉&
$words=array_reverse($words);//反转字数组
$s=implode('&',$words);//重建反转后的字符串
print $s;
?>