相关php中字符串作数组的操作

WBOY
Release: 2016-06-13 13:07:10
Original
860 people have browsed it

有关php中字符串作数组的操作
$str='1234567890abcdefgh';
echo $str[0];
这个官方是怎么认定的啊?

------解决方案--------------------
弱类型语言 编译的时候会自动帮你转换的
------解决方案--------------------
好像从C语言开始,字符串数据就被视为多个单个字符组成的特殊数组了。比如'abc',就是由'a''b''c''\0'组成。

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