= "/> = ">

字符串偏移量未设立

WBOY
Release: 2016-06-13 10:37:48
Original
958 people have browsed it

字符串偏移量未设置。

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);    
Copy after login

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

------解决方案--------------------
for($i = $len-1; $i >= 0; $i--)
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!