Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
该数组由 100 个项目组成。我需要初始化从-2开始的序列号的数组元素。
你的意思是SomeArray[-2]?这是不可能的,因为[ ]括号内的值是索引,它们不能是负数(但索引从 0 开始)......这就像在你的篮子里有负第二个苹果。
SomeArray[-2]
[ ]
但是如果你的意思是价值,你可以通过一个循环轻松地做到这一点
for (i=0; i<=100; i++) { SomeArray[i] = i-2; }
在服务器端包含的所有可能分隔符中,为什么 PHP 选择“小于问号 php”?
Rasmus(PHP 的发明者)私下回复了我,既然你关闭了这个问题,下面是答案:
它是一个 SGML 处理指令标签。请参阅http://en.wik