Home >Backend Development >PHP Tutorial >ecshop中$val{0}是什么意思?解决方案

ecshop中$val{0}是什么意思?解决方案

WBOY
WBOYOriginal
2016-06-13 11:08:41943browse

ecshop中$val{0}是什么意思???
rt

不是应该[0]的吗?为什么却变成了{0}?
------解决方案--------------------
字符串 $val 的第一个字符

虽然可以写作 $val[0] ,但为了防止歧义,php依然建议你写作 $val{0}
毕竟字符串和数组不是一回事

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