= "/> = ">

Home  >  Article  >  Backend Development  >  字符串偏移量未设立

字符串偏移量未设立

WBOY
WBOYOriginal
2016-06-13 10:37:48984browse

字符串偏移量未设置。

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->$str1 = "no job no address";     function Mystrrev($str1){        $newstr = "";        $len = strlen($str1);        for($i = $len; $i >= 0; $i--) {            $newstr .= $str1{$i};        }        return $newstr;    }    echo Mystrrev($str1);    

警告:Notice: Uninitialized string offset
请问这个偏移量怎么设置。

------解决方案--------------------
for($i = $len-1; $i >= 0; $i--)
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn