5、 怎样实现字符串翻转(不可使用函数)?

$a = ‘abcd’;

$str = ‘’;

For($i=strlen($a)-1;$i>=0;$i--){

      $str.=$a[$i];

}

Echo $str ;


猜你喜欢

转载自blog.csdn.net/qq_42029579/article/details/80732169